Reflect.js 978 B

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