file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Getter-decorators-Return-null-static-getter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return null; }; class Foo { @dec static get foo() { return; } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Getter-decorators-Return-object-instance-getter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return {}; }; class Foo { @dec get foo() { return; } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Getter-decorators-Return-object-private-instance-getter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return {}; }; class Foo { @dec get #foo() { return; } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Getter-decorators-Return-object-private-static-getter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return {}; }; class Foo { @dec static get #foo() { return; } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Getter-decorators-Return-object-static-getter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return {}; }; class Foo { @dec static get foo() { return; } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Getter-decorators-Shim-instance-getter.js
JavaScript
(() => { let bar; const dec = (fn, ctx) => { bar = function () { return fn.call(this) + 1; }; return bar; }; class Foo { bar = 123; @dec get foo() { return this.bar; } } assertEq(() => Object.getOwnPropertyDescriptor(Foo.prototype, 'foo').get, bar); as...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Getter-decorators-Shim-private-instance-getter.js
JavaScript
(() => { let bar; const dec = (fn, ctx) => { bar = function () { return fn.call(this) + 1; }; return bar; }; let get$foo; class Foo { #bar = 123; @dec get #foo() { return this.#bar; } static { get$foo = x => x.#foo; } } assertEq(() => get$foo(n...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Getter-decorators-Shim-private-static-getter.js
JavaScript
(() => { let bar; const dec = (fn, ctx) => { bar = function () { return fn.call(this) + 1; }; return bar; }; let get$foo; class Foo { static #bar = 123; @dec static get #foo() { return this.#bar; } static { get$foo = x => x.#foo; } } assertEq((...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Getter-decorators-Shim-static-getter.js
JavaScript
(() => { let bar; const dec = (fn, ctx) => { bar = function () { return fn.call(this) + 1; }; return bar; }; class Foo { static bar = 123; @dec static get foo() { return this.bar; } } assertEq(() => Object.getOwnPropertyDescriptor(Foo, 'foo').get, bar); ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Initializer-order-private-members,-class-expression.js
JavaScript
(() => { const log = []; // Class decorators const classDec1 = (cls, ctxClass) => { log.push('c2'); if (!assertEq(() => typeof ctxClass.addInitializer, 'function')) return; ctxClass.addInitializer(() => log.push('c5')); ctxClass.addInitializer(() => log.push('c6')...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Initializer-order-private-members,-class-statement.js
JavaScript
(() => { const log = []; // Class decorators const classDec1 = (cls, ctxClass) => { log.push('c2'); if (!assertEq(() => typeof ctxClass.addInitializer, 'function')) return; ctxClass.addInitializer(() => log.push('c5')); ctxClass.addInitializer(() => log.push('c6')...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Initializer-order-public-members,-class-expression.js
JavaScript
(() => { const log = []; // Class decorators const classDec1 = (cls, ctxClass) => { log.push('c2'); if (!assertEq(() => typeof ctxClass.addInitializer, 'function')) return; ctxClass.addInitializer(() => log.push('c5')); ctxClass.addInitializer(() => log.push('c6')...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Initializer-order-public-members,-class-statement.js
JavaScript
(() => { const log = []; // Class decorators const classDec1 = (cls, ctxClass) => { log.push('c2'); if (!assertEq(() => typeof ctxClass.addInitializer, 'function')) return; ctxClass.addInitializer(() => log.push('c5')); ctxClass.addInitializer(() => log.push('c6')...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Basic-instance-method.js
JavaScript
(() => { const old = {}; const dec = (key, name) => (fn, ctx) => { assertEq(() => typeof fn, 'function'); assertEq(() => fn.name, name); assertEq(() => ctx.kind, 'method'); assertEq(() => ctx.name, key); assertEq(() => ctx.static, false); assertEq(() => ctx.privat...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Basic-private-instance-method.js
JavaScript
(() => { let old; let lateAsserts; const dec = (fn, ctx) => { assertEq(() => typeof fn, 'function'); assertEq(() => fn.name, '#foo'); assertEq(() => ctx.kind, 'method'); assertEq(() => ctx.name, '#foo'); assertEq(() => ctx.static, false); assertEq(() => ctx.pr...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Basic-private-static-method.js
JavaScript
(() => { let old; let lateAsserts; const dec = (fn, ctx) => { assertEq(() => typeof fn, 'function'); assertEq(() => fn.name, '#foo'); assertEq(() => ctx.kind, 'method'); assertEq(() => ctx.name, '#foo'); assertEq(() => ctx.static, true); assertEq(() => ctx.pri...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Basic-static-method.js
JavaScript
(() => { const old = {}; const dec = (key, name) => (fn, ctx) => { assertEq(() => typeof fn, 'function'); assertEq(() => fn.name, name); assertEq(() => ctx.kind, 'method'); assertEq(() => ctx.name, key); assertEq(() => ctx.static, true); assertEq(() => ctx.private...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Extra-initializer-instance-method.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (fn, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.addIn...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Extra-initializer-private-instance-method.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (fn, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.addIn...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Extra-initializer-private-static-method.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (fn, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.addIn...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Extra-initializer-static-method.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (fn, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.addIn...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Order-instance-method.js
JavaScript
(() => { const log = []; let bar; let baz; const dec1 = (fn, ctx) => { log.push(2); bar = function () { log.push(4); return fn.call(this); }; return bar; }; const dec2 = (fn, ctx) => { log.push(1); baz = function () { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Order-private-instance-method.js
JavaScript
(() => { const log = []; let bar; let baz; const dec1 = (fn, ctx) => { log.push(2); bar = function () { log.push(4); return fn.call(this); }; return bar; }; const dec2 = (fn, ctx) => { log.push(1); baz = function () { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Order-private-static-method.js
JavaScript
(() => { const log = []; let bar; let baz; const dec1 = (fn, ctx) => { log.push(2); bar = function () { log.push(4); return fn.call(this); }; return bar; }; const dec2 = (fn, ctx) => { log.push(1); baz = function () { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Order-static-method.js
JavaScript
(() => { const log = []; let bar; let baz; const dec1 = (fn, ctx) => { log.push(2); bar = function () { log.push(4); return fn.call(this); }; return bar; }; const dec2 = (fn, ctx) => { log.push(1); baz = function () { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Return-null-instance-method.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return null; }; class Foo { @dec foo() { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Return-null-private-instance-method.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return null; }; class Foo { @dec #foo() { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Return-null-private-static-method.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return null; }; class Foo { @dec static #foo() { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Return-null-static-method.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return null; }; class Foo { @dec static foo() { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Return-object-instance-method.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return {}; }; class Foo { @dec foo() { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Return-object-private-instance-method.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return {}; }; class Foo { @dec #foo() { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Return-object-private-static-method.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return {}; }; class Foo { @dec static #foo() { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Return-object-static-method.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return {}; }; class Foo { @dec static foo() { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Shim-instance-method.js
JavaScript
(() => { let bar; const dec = (fn, ctx) => { bar = function () { return fn.call(this) + 1; }; return bar; }; class Foo { bar = 123; @dec foo() { return this.bar; } } assertEq(() => Foo.prototype.foo, bar); assertEq(() => new Foo().foo(), 124); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Shim-private-instance-method.js
JavaScript
(() => { let bar; const dec = (fn, ctx) => { bar = function () { return fn.call(this) + 1; }; return bar; }; let $foo; class Foo { bar = 123; @dec #foo() { return this.bar; } static { $foo = new Foo().#foo; } } assertEq(() => $foo, bar); as...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Shim-private-static-method.js
JavaScript
(() => { let bar; const dec = (fn, ctx) => { bar = function () { return fn.call(this) + 1; }; return bar; }; let $foo; class Foo { static bar = 123; @dec static #foo() { return this.bar; } static { $foo = this.#foo; } } assertEq(() => $foo, bar...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Method-decorators-Shim-static-method.js
JavaScript
(() => { let bar; const dec = (fn, ctx) => { bar = function () { return fn.call(this) + 1; }; return bar; }; class Foo { static bar = 123; @dec static foo() { return this.bar; } } assertEq(() => Foo.foo, bar); assertEq(() => Foo.foo(), 124); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Basic-instance-setter.js
JavaScript
(() => { const dec = (key, name) => (fn, ctx) => { assertEq(() => typeof fn, 'function'); assertEq(() => fn.name, name); assertEq(() => ctx.kind, 'setter'); assertEq(() => ctx.name, key); assertEq(() => ctx.static, false); assertEq(() => ctx.private, false); a...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Basic-private-instance-setter.js
JavaScript
(() => { let lateAsserts; const dec = (fn, ctx) => { assertEq(() => typeof fn, 'function'); assertEq(() => fn.name, 'set #foo'); assertEq(() => ctx.kind, 'setter'); assertEq(() => ctx.name, '#foo'); assertEq(() => ctx.static, false); assertEq(() => ctx.private, tr...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Basic-private-static-setter.js
JavaScript
(() => { let lateAsserts; const dec = (fn, ctx) => { assertEq(() => typeof fn, 'function'); assertEq(() => fn.name, 'set #foo'); assertEq(() => ctx.kind, 'setter'); assertEq(() => ctx.name, '#foo'); assertEq(() => ctx.static, true); assertEq(() => ctx.private, tru...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Basic-static-setter.js
JavaScript
(() => { const dec = (key, name) => (fn, ctx) => { assertEq(() => typeof fn, 'function'); assertEq(() => fn.name, name); assertEq(() => ctx.kind, 'setter'); assertEq(() => ctx.name, key); assertEq(() => ctx.static, true); assertEq(() => ctx.private, false); as...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Extra-initializer-instance-setter.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (fn, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.addIn...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Extra-initializer-private-instance-setter.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (fn, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.addIn...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Extra-initializer-private-static-setter.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (fn, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.addIn...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Extra-initializer-static-setter.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (fn, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.addIn...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Order-instance-setter.js
JavaScript
(() => { const log = []; let bar; let baz; const dec1 = (fn, ctx) => { log.push(2); bar = function (x) { log.push(4); fn.call(this, x); }; return bar; }; const dec2 = (fn, ctx) => { log.push(1); baz = function (x) { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Order-private-instance-setter.js
JavaScript
(() => { const log = []; let bar; let baz; const dec1 = (fn, ctx) => { log.push(2); bar = function (x) { log.push(4); fn.call(this, x); }; return bar; }; const dec2 = (fn, ctx) => { log.push(1); baz = function (x) { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Order-private-static-setter.js
JavaScript
(() => { const log = []; let bar; let baz; const dec1 = (fn, ctx) => { log.push(2); bar = function (x) { log.push(4); fn.call(this, x); }; return bar; }; const dec2 = (fn, ctx) => { log.push(1); baz = function (x) { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Order-static-setter.js
JavaScript
(() => { const log = []; let bar; let baz; const dec1 = (fn, ctx) => { log.push(2); bar = function (x) { log.push(4); fn.call(this, x); }; return bar; }; const dec2 = (fn, ctx) => { log.push(1); baz = function (x) { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Return-null-instance-setter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return null; }; class Foo { @dec set foo(x) { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Return-null-private-instance-setter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return null; }; class Foo { @dec set #foo(x) { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Return-null-private-static-setter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return null; }; class Foo { @dec static set #foo(x) { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Return-null-static-setter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return null; }; class Foo { @dec static set foo(x) { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Return-object-instance-setter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return {}; }; class Foo { @dec set foo(x) { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Return-object-private-instance-setter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return {}; }; class Foo { @dec set #foo(x) { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Return-object-private-static-setter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return {}; }; class Foo { @dec static set #foo(x) { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Return-object-static-setter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return {}; }; class Foo { @dec static set foo(x) { } } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Shim-instance-setter.js
JavaScript
(() => { let bar; const dec = (fn, ctx) => { bar = function (x) { fn.call(this, x + 1); }; return bar; }; class Foo { bar = 123; @dec set foo(x) { this.bar = x; } } assertEq(() => Object.getOwnPropertyDescriptor(Foo.prototype, 'foo').set, bar); var obj...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Shim-private-instance-setter.js
JavaScript
(() => { let bar; const dec = (fn, ctx) => { bar = function (x) { fn.call(this, x + 1); }; return bar; }; let set$foo; class Foo { bar = 123; @dec set #foo(x) { this.bar = x; } static { set$foo = (x, y) => { x.#foo = y; }; } } var obj = new Foo...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Shim-private-static-setter.js
JavaScript
(() => { let bar; const dec = (fn, ctx) => { bar = function (x) { fn.call(this, x + 1); }; return bar; }; let set$foo; class Foo { static bar = 123; @dec static set #foo(x) { this.bar = x; } static { set$foo = (x, y) => { x.#foo = y; }; } } ass...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Setter-decorators-Shim-static-setter.js
JavaScript
(() => { let bar; const dec = (fn, ctx) => { bar = function (x) { fn.call(this, x + 1); }; return bar; }; class Foo { static bar = 123; @dec static set foo(x) { this.bar = x; } } assertEq(() => Object.getOwnPropertyDescriptor(Foo, 'foo').set, bar); Foo...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator_evanw.rs
Rust
use std::{fs, path::PathBuf}; use swc_ecma_parser::{EsSyntax, Syntax}; use swc_ecma_transforms_proposal::decorator_2022_03::decorator_2022_03; use swc_ecma_transforms_testing::exec_tr; const HELPERS: &str = r###" function assertEq(callback, expected) { let details; try { let x = callback(); if...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators.rs
Rust
#![allow(unused)] use std::{ path::{Path, PathBuf}, rc::Rc, }; use serde::Deserialize; use swc_common::{comments::SingleThreadedComments, Mark}; use swc_ecma_ast::Pass; use swc_ecma_parser::{EsSyntax, Syntax, TsSyntax}; use swc_ecma_transforms_base::{assumptions::Assumptions, resolver}; use swc_ecma_transform...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/.2022-03-assumption-constantSuper/super-in-nested-constructor-expression/input.js
JavaScript
const dec = () => {}; @dec class Foo extends Bar { constructor() { let foo = super(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/.2022-03-assumption-constantSuper/super-in-nested-constructor-expression/output.js
JavaScript
var _initClass; const dec = () => { }; let _Foo; class Foo extends Bar { static { [_Foo, _initClass] = _applyDecs2203R(this, [], [dec]).c; } constructor() { let foo = super(); } static { _initClass(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/.2022-03-assumption-constantSuper/super-in-private-accessor/input.js
JavaScript
const dec = () => {}; class Foo extends Bar { @dec get #x() { return super.foo(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/.2022-03-assumption-constantSuper/super-in-private-accessor/output.js
JavaScript
var _call_x, _initProto; const dec = () => { }; class Foo extends Bar { static { [_call_x, _initProto] = _applyDecs2203R(this, [[dec, 3, "x", function () { return Bar.prototype.foo.call(this); }]], []).e; } constructor(...args) { super(...args); _initProto(this); } get #x() { return ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/.2022-03-assumption-constantSuper/super-in-private-method/input.js
JavaScript
const dec = () => {}; class Foo extends Bar { @dec #x() { return super.foo(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/.2022-03-assumption-constantSuper/super-in-private-method/output.js
JavaScript
var _call_x, _initProto; const dec = () => { }; class Foo extends Bar { static { [_call_x, _initProto] = _applyDecs2203R(this, [[dec, 2, "x", function () { return Bar.prototype.foo.call(this); }]], []).e; } constructor(...args) { super(...args); _initProto(this); } #x = _call_x; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/private/exec.js
JavaScript
function dec({ get, set }, context) { context.addInitializer(function() { this[context.name + 'Context'] = context; }); return { get() { return get.call(this) + 1; }, set(v) { set.call(this, v + 1); }, init(v) { return v ? v : 1; } } } class Foo { @dec acces...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/private/input.js
JavaScript
const dec = () => {}; class Foo { @dec accessor #a; @dec accessor #b = 123; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/private/output.js
JavaScript
var _init_a, _get___a, _set___a, _init_b, _get___b, _set___b, _initProto; const dec = ()=>{}; var ___a_1 = /*#__PURE__*/ new WeakMap(), _a = /*#__PURE__*/ new WeakMap(), ___b_2 = /*#__PURE__*/ new WeakMap(), _b = /*#__PURE__*/ new WeakMap(); class Foo { constructor(){ _class_private_field_init(this, _a, { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/public/exec.js
JavaScript
function dec({ get, set }, context) { context.addInitializer(function() { this[context.name + 'Context'] = context; }); return { get() { return get.call(this) + 1; }, set(v) { set.call(this, v + 1); }, init(v) { return v ? v : 1; } } } class Foo { @dec acces...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/public/input.js
JavaScript
const dec = () => {}; class Foo { @dec accessor a; @dec accessor b = 123; @dec accessor ['c'] = 456; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/public/output.js
JavaScript
var _init_a, _init_b, _computedKey, _init_computedKey, _initProto; const dec = ()=>{}; _computedKey = 'c'; var ____private_a_1 = /*#__PURE__*/ new WeakMap(), ____private_b_2 = /*#__PURE__*/ new WeakMap(), ____private_computedKey_3 = /*#__PURE__*/ new WeakMap(); let _computedKey1 = _computedKey, _computedKey2 = _compute...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/static-private/exec.js
JavaScript
function dec({ get, set }, context) { context.addInitializer(function() { this[context.name + 'Context'] = context; }); return { get() { return get.call(this) + 1; }, set(v) { set.call(this, v + 1); }, init(v) { return v ? v : 1; } } } class Foo { @dec stati...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/static-private/input.js
JavaScript
const dec = () => {}; class Foo { @dec static accessor #a; @dec static accessor #b = 123; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/static-private/output.js
JavaScript
var _init_a, _get___a, _set___a, _init_b, _get___b, _set___b, _initStatic; const dec = ()=>{}; class Foo { } var _a = { get: get_a, set: set_a }; var _b = { get: get_b, set: set_b }; (()=>{ ({ e: [_init_a, _get___a, _set___a, _init_b, _get___b, _set___b, _initStatic] } = _apply_decs_2203_r(Foo, [ ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/static-public/exec.js
JavaScript
function dec({ get, set }, context) { context.addInitializer(function() { this[context.name + 'Context'] = context; }); return { get() { return get.call(this) + 1; }, set(v) { set.call(this, v + 1); }, init(v) { return v ? v : 1; } } } class Foo { @dec stati...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/static-public/input.js
JavaScript
const dec = () => {}; class Foo { @dec static accessor a; @dec static accessor b = 123; @dec static accessor ['c'] = 456; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/static-public/output.js
JavaScript
var _init_a, _init_b, _computedKey, _init_computedKey, _initStatic; const dec = ()=>{}; _computedKey = 'c'; let _computedKey1 = _computedKey, _computedKey2 = _computedKey; class Foo { static get a() { return _class_static_private_field_spec_get(this, Foo, ____private_a_1); } static set a(_v) { ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/undecorated-private/exec.js
JavaScript
class Foo { accessor #a; accessor #b = 123; getA() { return this.#a; } setA(v) { this.#a = v; } getB() { return this.#b; } setB(v) { this.#b = v; } } let foo = new Foo(); expect(foo.getA()).toBe(undefined); foo.setA(123) expect(foo.getA()).toBe(123); expect(foo.getB()).toBe(1...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/undecorated-private/input.js
JavaScript
const dec = () => {}; class Foo { accessor #a; accessor #b = 123; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/undecorated-private/output.js
JavaScript
const dec = ()=>{}; var ___a_1 = /*#__PURE__*/ new WeakMap(), _a = /*#__PURE__*/ new WeakMap(), ___b_2 = /*#__PURE__*/ new WeakMap(), _b = /*#__PURE__*/ new WeakMap(); class Foo { constructor(){ _class_private_field_init(this, _a, { get: get_a, set: set_a }); _class_p...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/undecorated-public/exec.js
JavaScript
class Foo { accessor a; accessor b = 123; accessor ['c'] = 456; } let foo = new Foo(); expect(foo.a).toBe(undefined); foo.a = 123; expect(foo.a).toBe(123); expect(foo.hasOwnProperty('a')).toBe(false); expect(Foo.prototype.hasOwnProperty('a')).toBe(true); expect(foo.b).toBe(123); foo.b = 456 expect(foo.b).toB...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/undecorated-public/input.js
JavaScript
const dec = () => {}; class Foo { accessor a; accessor b = 123; accessor ['c'] = 456; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/undecorated-public/output.js
JavaScript
var _computedKey; const dec = ()=>{}; _computedKey = 'c'; var ____private_a_1 = /*#__PURE__*/ new WeakMap(), ____private_b_2 = /*#__PURE__*/ new WeakMap(), ____private_computedKey_3 = /*#__PURE__*/ new WeakMap(); let _computedKey1 = _computedKey, _computedKey2 = _computedKey; class Foo { get a() { return _c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/undecorated-static-private/exec.js
JavaScript
class Foo { static accessor #a; static accessor #b = 123; static getA() { return this.#a; } static setA(v) { this.#a = v; } static getB() { return this.#b; } static setB(v) { this.#b = v; } } expect(Foo.getA()).toBe(undefined); Foo.setA(123) expect(Foo.getA()).toBe(123); expec...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/undecorated-static-private/input.js
JavaScript
const dec = () => {}; class Foo { static accessor #a; static accessor #b = 123; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/undecorated-static-private/output.js
JavaScript
const dec = ()=>{}; class Foo { } var _a = { get: get_a, set: set_a }; var _b = { get: get_b, set: set_b }; var ___a_1 = { writable: true, value: void 0 }; var ___b_2 = { writable: true, value: 123 }; function get_a() { return _class_static_private_field_spec_get(this, Foo, ___a_1); ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/undecorated-static-public/exec.js
JavaScript
class Foo { static accessor a; static accessor b = 123; static accessor ['c'] = 456; } expect(Foo.a).toBe(undefined); Foo.a = 123; expect(Foo.a).toBe(123); expect(Foo.hasOwnProperty('a')).toBe(true); expect(Foo.b).toBe(123); Foo.b = 456 expect(Foo.b).toBe(456); expect(Foo.hasOwnProperty('b')).toBe(true); exp...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/undecorated-static-public/input.js
JavaScript
const dec = () => {}; class Foo { static accessor a; static accessor b = 123; static accessor ['c'] = 456; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors--to-es2015/undecorated-static-public/output.js
JavaScript
var _computedKey; const dec = ()=>{}; _computedKey = 'c'; let _computedKey1 = _computedKey, _computedKey2 = _computedKey; class Foo { static get a() { return _class_static_private_field_spec_get(this, Foo, ____private_a_1); } static set a(_v) { _class_static_private_field_spec_set(this, Foo,...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors/private/input.js
JavaScript
const dec = () => {}; class Foo { @dec accessor #a; @dec accessor #b = 123; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors/private/output.js
JavaScript
var _init_a, _get___a, _set___a, _init_b, _get___b, _set___b, _initProto; const dec = ()=>{}; class Foo { static{ ({ e: [_init_a, _get___a, _set___a, _init_b, _get___b, _set___b, _initProto] } = _apply_decs_2203_r(this, [ [ dec, 1, "a", ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors/public/input.js
JavaScript
const dec = () => {}; class Foo { @dec accessor a; @dec accessor b = 123; @dec accessor ['c'] = 456; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors/public/output.js
JavaScript
var _init_a, _init_b, _computedKey, _init_computedKey, _initProto; const dec = ()=>{}; _computedKey = 'c'; class Foo { static{ ({ e: [_init_a, _init_b, _init_computedKey, _initProto] } = _apply_decs_2203_r(this, [ [ dec, 1, "a" ], ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors/static-private/input.js
JavaScript
const dec = () => {}; class Foo { @dec static accessor #a; @dec static accessor #b = 123; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors/static-private/output.js
JavaScript
var _init_a, _get___a, _set___a, _init_b, _get___b, _set___b, _initStatic; const dec = ()=>{}; class Foo { static{ ({ e: [_init_a, _get___a, _set___a, _init_b, _get___b, _set___b, _initStatic] } = _apply_decs_2203_r(this, [ [ dec, 6, "a", ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorators/2022-03-accessors/static-public/input.js
JavaScript
const dec = () => {}; class Foo { @dec static accessor a; @dec static accessor b = 123; @dec static accessor ['c'] = 456; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University