mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
25 lines
405 B
JavaScript
25 lines
405 B
JavaScript
/**
|
|
* Increment a number by 1.
|
|
*
|
|
* @param {number} n - The number to increment.
|
|
*/
|
|
var increment = n => n + 1;
|
|
|
|
/**
|
|
* Print a value to the console.
|
|
*/
|
|
var print = (/** @type {*} */ val) => console.log(val);
|
|
|
|
/**
|
|
* Create a class with a `name` property.
|
|
*/
|
|
var createClass = () => class {
|
|
get name() {
|
|
return this._name;
|
|
}
|
|
|
|
set name(value) {
|
|
this._name = value;
|
|
}
|
|
}
|