| 1 |
exports.get_char_at = function() { |
| 2 |
return "foo".charAt; |
| 3 |
}; |
| 4 |
|
| 5 |
exports.Rectangle = class { |
| 6 |
constructor(x, y){ |
| 7 |
this.x = x, |
| 8 |
this.y = y |
| 9 |
} |
| 10 |
|
| 11 |
static eq(x, y) { |
| 12 |
return x === y; |
| 13 |
} |
| 14 |
}; |
| 15 |
|
| 16 |
exports.Rectangle2 = class { |
| 17 |
constructor(x, y){ |
| 18 |
this.x = x, |
| 19 |
this.y = y |
| 20 |
} |
| 21 |
|
| 22 |
static eq(x, y) { |
| 23 |
return x === y; |
| 24 |
} |
| 25 |
}; |
| 26 |
|
| 27 |
exports.throw_all_the_time = () => new Proxy({}, { |
| 28 |
getPrototypeOf() { throw new Error("nope"); }, |
| 29 |
setPrototypeOf() { throw new Error("nope"); }, |
| 30 |
isExtensible() { throw new Error("nope"); }, |
| 31 |
preventExtensions() { throw new Error("nope"); }, |
| 32 |
getOwnPropertyDescriptor() { throw new Error("nope"); }, |
| 33 |
defineProperty() { throw new Error("nope"); }, |
| 34 |
has() { throw new Error("nope"); }, |
| 35 |
get() { throw new Error("nope"); }, |
| 36 |
set() { throw new Error("nope"); }, |
| 37 |
deleteProperty() { throw new Error("nope"); }, |
| 38 |
ownKeys() { throw new Error("nope"); }, |
| 39 |
apply() { throw new Error("nope"); }, |
| 40 |
construct() { throw new Error("nope"); }, |
| 41 |
}); |