wasm-bindgen/examples/deno/defined-in-js.js
2020-06-03 22:31:05 +02:00

18 lines
232 B
JavaScript

export class MyClass {
constructor() {
this._number = 42;
}
get number() {
return this._number;
}
set number(n) {
return (this._number = n);
}
render() {
return `My number is: ${this.number}`;
}
}