.cargo/vendor/wasm-bindgen/tests/wasm/final.js
raw| 1 | const assert = require('assert'); |
| 2 | |
| 3 | exports.MyType = class { |
| 4 | static foo(y) { |
| 5 | assert.equal(y, 'x'); |
| 6 | return y + 'y'; |
| 7 | } |
| 8 | |
| 9 | constructor(x) { |
| 10 | assert.equal(x, 2); |
| 11 | this._a = 1; |
| 12 | } |
| 13 | |
| 14 | bar(x) { |
| 15 | assert.equal(x, true); |
| 16 | return 3.2; |
| 17 | } |
| 18 | |
| 19 | get a() { |
| 20 | return this._a; |
| 21 | } |
| 22 | set a(v) { |
| 23 | this._a = v; |
| 24 | } |
| 25 | }; |