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_compat/tests/private-in-object/.private-loose/static-accessor/output.js
JavaScript
var _foo = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("foo"); let Foo = /*#__PURE__*/function () { "use strict"; function Foo() { babelHelpers.classCallCheck(this, Foo); } babelHelpers.createClass(Foo, [{ key: "test", value: function test(other) { return Object.prototype.hasOwnProperty.call(other, _foo); } }]); return Foo; }(); function _get_foo() {} Object.defineProperty(Foo, _foo, { get: _get_foo, set: void 0 });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/.private-loose/static-field/input.js
JavaScript
class Foo { static #foo = 1; test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/.private-loose/static-field/output.js
JavaScript
var _foo = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("foo"); let Foo = /*#__PURE__*/function () { "use strict"; function Foo() { babelHelpers.classCallCheck(this, Foo); } babelHelpers.createClass(Foo, [{ key: "test", value: function test(other) { return Object.prototype.hasOwnProperty.call(other, _foo); } }]); return Foo; }(); Object.defineProperty(Foo, _foo, { writable: true, value: 1 });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/.private-loose/static-method/input.js
JavaScript
class Foo { static #foo() {} test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/.private-loose/static-method/output.js
JavaScript
var _foo = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("foo"); let Foo = /*#__PURE__*/function () { "use strict"; function Foo() { babelHelpers.classCallCheck(this, Foo); } babelHelpers.createClass(Foo, [{ key: "test", value: function test(other) { return Object.prototype.hasOwnProperty.call(other, _foo); } }]); return Foo; }(); function _foo2() {} Object.defineProperty(Foo, _foo, { value: _foo2 });
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/accessor/input.js
JavaScript
class Foo { get #foo() {} test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/accessor/output.js
JavaScript
var _foo = /*#__PURE__*/ new WeakMap(); let Foo = /*#__PURE__*/ function() { "use strict"; function Foo() { _class_call_check(this, Foo); _class_private_field_init(this, _foo, { get: get_foo, set: void 0 }); } _create_class(Foo, [ { key: "test", value: function test(other) { return _foo.has(other); } } ]); return Foo; }(); function get_foo() {}
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/field/input.js
JavaScript
class Foo { #foo = 1; test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/field/output.js
JavaScript
var _foo = /*#__PURE__*/ new WeakMap(); let Foo = /*#__PURE__*/ function() { "use strict"; function Foo() { _class_call_check(this, Foo); _class_private_field_init(this, _foo, { writable: true, value: 1 }); } _create_class(Foo, [ { key: "test", value: function test(other) { return _foo.has(other); } } ]); return Foo; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/method/input.js
JavaScript
class Foo { #foo() {} test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/method/output.js
JavaScript
var _foo = /*#__PURE__*/ new WeakSet(); let Foo = /*#__PURE__*/ function() { "use strict"; function Foo() { _class_call_check(this, Foo); _class_private_method_init(this, _foo); } _create_class(Foo, [ { key: "test", value: function test(other) { return _foo.has(other); } } ]); return Foo; }(); function foo() {}
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/native-classes/input.js
JavaScript
class Foo { static #foo = "foo"; #bar = "bar"; static test() { return #foo in Foo; } test() { return #bar in this; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/native-classes/output.js
JavaScript
var _bar = /*#__PURE__*/ new WeakMap(); class Foo { static test() { return Foo === Foo; } test() { return _bar.has(this); } constructor(){ _class_private_field_init(this, _bar, { writable: true, value: "bar" }); } } var _foo = { writable: true, value: "foo" };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/nested-class-other-redeclared/input.js
JavaScript
class Foo { #foo = 1; #bar = 1; test() { class Nested { #bar = 2; test() { #foo in this; #bar in this; } } #foo in this; #bar in this; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/nested-class-other-redeclared/output.js
JavaScript
var _foo = /*#__PURE__*/ new WeakMap(), _bar = /*#__PURE__*/ new WeakMap(); let Foo = /*#__PURE__*/ function() { "use strict"; function Foo() { _class_call_check(this, Foo); _class_private_field_init(this, _foo, { writable: true, value: 1 }); _class_private_field_init(this, _bar, { writable: true, value: 1 }); } _create_class(Foo, [ { key: "test", value: function test() { var _bar1 = /*#__PURE__*/ new WeakMap(); let Nested = /*#__PURE__*/ function() { function Nested() { _class_call_check(this, Nested); _class_private_field_init(this, _bar1, { writable: true, value: 2 }); } _create_class(Nested, [ { key: "test", value: function test() { _foo.has(this); _bar1.has(this); } } ]); return Nested; }(); _foo.has(this); _bar.has(this); } } ]); return Foo; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/nested-class-redeclared/input.js
JavaScript
class Foo { #foo = 1; test() { class Nested { #foo = 2; test() { #foo in this; } } #foo in this; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/nested-class-redeclared/output.js
JavaScript
var _foo = /*#__PURE__*/ new WeakMap(); let Foo = /*#__PURE__*/ function() { "use strict"; function Foo() { _class_call_check(this, Foo); _class_private_field_init(this, _foo, { writable: true, value: 1 }); } _create_class(Foo, [ { key: "test", value: function test() { var _foo1 = /*#__PURE__*/ new WeakMap(); let Nested = /*#__PURE__*/ function() { function Nested() { _class_call_check(this, Nested); _class_private_field_init(this, _foo1, { writable: true, value: 2 }); } _create_class(Nested, [ { key: "test", value: function test() { _foo1.has(this); } } ]); return Nested; }(); _foo.has(this); } } ]); return Foo; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/nested-class/input.js
JavaScript
class Foo { #foo = 1; test() { class Nested { test() { #foo in this; } } #foo in this; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/nested-class/output.js
JavaScript
var _foo = /*#__PURE__*/ new WeakMap(); let Foo = /*#__PURE__*/ function() { "use strict"; function Foo() { _class_call_check(this, Foo); _class_private_field_init(this, _foo, { writable: true, value: 1 }); } _create_class(Foo, [ { key: "test", value: function test() { let Nested = /*#__PURE__*/ function() { function Nested() { _class_call_check(this, Nested); } _create_class(Nested, [ { key: "test", value: function test() { _foo.has(this); } } ]); return Nested; }(); _foo.has(this); } } ]); return Foo; }();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/static-accessor/input.js
JavaScript
class Foo { static get #foo() {} test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/static-accessor/output.js
JavaScript
let Foo = /*#__PURE__*/ function() { "use strict"; function Foo() { _class_call_check(this, Foo); } _create_class(Foo, [ { key: "test", value: function test(other) { return other === Foo; } } ]); return Foo; }(); var _foo = { get: get_foo, set: void 0 }; function get_foo() {}
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/static-field/input.js
JavaScript
class Foo { static #foo = 1; test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/static-field/output.js
JavaScript
let Foo = /*#__PURE__*/ function() { "use strict"; function Foo() { _class_call_check(this, Foo); } _create_class(Foo, [ { key: "test", value: function test(other) { return other === Foo; } } ]); return Foo; }(); var _foo = { writable: true, value: 1 };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/static-method/input.js
JavaScript
class Foo { static #foo() {} test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/private/static-method/output.js
JavaScript
let Foo = /*#__PURE__*/ function() { "use strict"; function Foo() { _class_call_check(this, Foo); } _create_class(Foo, [ { key: "test", value: function test(other) { return other === Foo; } } ]); return Foo; }(); function foo() {}
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/accessor/input.js
JavaScript
class Foo { get #foo() {} test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/accessor/output.js
JavaScript
var _brand_check_Foo = new WeakSet(); class Foo { get #foo() { } test(other) { return _brand_check_Foo.has(other); } constructor(){ _brand_check_Foo.add(this); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/class-expression-in-default-param/input.js
JavaScript
( x = class { #foo; test(other) { return #foo in other; } } ) => {};
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/class-expression-in-default-param/output.js
JavaScript
(x = (()=>{ var _brand_check_foo; return _brand_check_foo = new WeakSet(), class { #foo = void _brand_check_foo.add(this); test(other) { return _brand_check_foo.has(other); } }; })())=>{ };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/class-expression-instance/input.js
JavaScript
function fn() { return new (class { #priv; method(obj) { return #priv in obj; } })(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/class-expression-instance/output.js
JavaScript
function fn() { var _brand_check_priv; return new (_brand_check_priv = new WeakSet(), class { #priv = void _brand_check_priv.add(this); method(obj) { return _brand_check_priv.has(obj); } })(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/class-expression-static/input.js
JavaScript
function fn() { return new (class { static #priv; method(obj) { return #priv in obj; } })(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/class-expression-static/output.js
JavaScript
function fn() { var _brand_check_priv; return new (_brand_check_priv = new WeakSet(), class { static #priv = void _brand_check_priv.add(this); method(obj) { return _brand_check_priv.has(obj); } })(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/field/input.js
JavaScript
class Foo { #foo = 1; test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/field/output.js
JavaScript
var _tmp, _brand_check_foo = new WeakSet(); class Foo { #foo = (_tmp = 1, _brand_check_foo.add(this), _tmp); test(other) { return _brand_check_foo.has(other); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/half-constructed-instance/exec.js
JavaScript
let hasW, hasX, hasY, hasZ; let halfConstructed; class F { m() { hasW = #w in this; hasX = #x in this; hasY = #y in this; hasZ = #z in this; } get #w() {} #x = 0; #y = (() => { halfConstructed = this; throw "error"; })(); #z() {} } try { new F(); } catch {} halfConstructed.m(); expect(hasW).toBe(true); expect(hasX).toBe(true); expect(hasY).toBe(false); expect(hasZ).toBe(true);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/half-constructed-instance/input.js
JavaScript
class F { m() { #w in this; #x in this; #y in this; #z in this; } get #w() {} #x = 0; #y = (() => { throw "error"; })(); #z() {} }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/half-constructed-instance/output.js
JavaScript
var _brand_check_F = new WeakSet(), _brand_check_x = new WeakSet(), _brand_check_y = new WeakSet(), _tmp, _tmp1; class F { m() { _brand_check_F.has(this); _brand_check_x.has(this); _brand_check_y.has(this); _brand_check_F.has(this); } get #w() {} #x = (_tmp = 0, _brand_check_x.add(this), _tmp); #y = (_tmp1 = (()=>{ throw "error"; })(), _brand_check_y.add(this), _tmp1); #z() {} constructor(){ _brand_check_F.add(this); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/half-constructed-static/exec.js
JavaScript
let hasW, hasX, hasY, hasZ; let halfConstructed; try { class F { static m() { hasW = #w in this; hasX = #x in this; hasY = #y in this; hasZ = #z in this; } static get #w() {} static #x = 0; static #y = (() => { halfConstructed = this; throw "error"; })(); static #z() {} } } catch {} halfConstructed.m(); expect(hasW).toBe(true); expect(hasX).toBe(true); expect(hasY).toBe(false); expect(hasZ).toBe(true);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/half-constructed-static/input.js
JavaScript
class F { static m() { #x in this; #y in this; #z in this; } static #x = 0; static #y = (() => { throw "error"; })(); static #z() {} }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/half-constructed-static/output.js
JavaScript
var _brand_check_x = new WeakSet(), _brand_check_y = new WeakSet(), _tmp, _tmp1; class F { static m() { _brand_check_x.has(this); _brand_check_y.has(this); F === this; } static #x = (_tmp = 0, _brand_check_x.add(this), _tmp); static #y = (_tmp1 = (()=>{ throw "error"; })(), _brand_check_y.add(this), _tmp1); static #z() {} }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/method/input.js
JavaScript
class Foo { #foo() {} test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/method/output.js
JavaScript
var _brand_check_Foo = new WeakSet(); class Foo { #foo() { } test(other) { return _brand_check_Foo.has(other); } constructor(){ _brand_check_Foo.add(this); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/multiple-checks/input.js
JavaScript
class A { #x; #m() {} test() { #x in this; #m in this; #x in this; #m in this; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/multiple-checks/output.js
JavaScript
var _brand_check_x = new WeakSet(), _brand_check_A = new WeakSet(); class A { #x = void _brand_check_x.add(this); #m() { } test() { _brand_check_x.has(this); _brand_check_A.has(this); _brand_check_x.has(this); _brand_check_A.has(this); } constructor(){ _brand_check_A.add(this); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/nested-class-other-redeclared/input.js
JavaScript
class Foo { #foo = 1; #bar = 1; test() { class Nested { #bar = 2; test() { #foo in this; #bar in this; } } #foo in this; #bar in this; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/nested-class-other-redeclared/output.js
JavaScript
var _tmp, _tmp1, _brand_check_foo1 = new WeakSet(), _brand_check_bar = new WeakSet(); class Foo { #foo = (_tmp = 1, _brand_check_foo1.add(this), _tmp); #bar = (_tmp1 = 1, _brand_check_bar.add(this), _tmp1); test() { var _tmp, _brand_check_bar1 = new WeakSet(); class Nested { #bar = (_tmp = 2, _brand_check_bar1.add(this), _tmp); test() { _brand_check_foo.has(this); _brand_check_bar1.has(this); } } _brand_check_foo1.has(this); _brand_check_bar.has(this); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/nested-class-redeclared/input.js
JavaScript
class Foo { #foo = 1; test() { class Nested { #foo = 2; test() { #foo in this; } } #foo in this; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/nested-class-redeclared/output.js
JavaScript
var _tmp, _brand_check_foo = new WeakSet(); class Foo { #foo = (_tmp = 1, _brand_check_foo.add(this), _tmp); test() { var _tmp, _brand_check_foo1 = new WeakSet(); class Nested { #foo = (_tmp = 2, _brand_check_foo1.add(this), _tmp); test() { _brand_check_foo1.has(this); } } _brand_check_foo.has(this); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/nested-class/input.js
JavaScript
class Foo { #foo = 1; test() { class Nested { test() { #foo in this; } } #foo in this; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/nested-class/output.js
JavaScript
var _tmp, _brand_check_foo1 = new WeakSet(); class Foo { #foo = (_tmp = 1, _brand_check_foo1.add(this), _tmp); test() { class Nested { test() { _brand_check_foo.has(this); } } _brand_check_foo1.has(this); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/static-accessor/input.js
JavaScript
class Foo { static get #foo() {} test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/static-accessor/output.js
JavaScript
class Foo { static get #foo() { } test(other) { return Foo === other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/static-field/input.js
JavaScript
class Foo { static #foo = 1; test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/static-field/output.js
JavaScript
var _tmp, _brand_check_foo = new WeakSet(); class Foo { static #foo = (_tmp = 1, _brand_check_foo.add(this), _tmp); test(other) { return _brand_check_foo.has(other); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/static-method/input.js
JavaScript
class Foo { static #foo() {} test(other) { return #foo in other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/static-method/output.js
JavaScript
class Foo { static #foo() { } test(other) { return Foo === other; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/static-shadowed-binding/input.js
JavaScript
class A { static #foo; test() { let A = function fn(A) { return #foo in A; }; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/private-in-object/to-native-fields/static-shadowed-binding/output.js
JavaScript
var _brand_check_foo = new WeakSet(); class A { static #foo = void _brand_check_foo.add(this); test() { let A = function fn(A) { return _brand_check_foo.has(A); }; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/.method-type-annotations/input.js
JavaScript
// @flow var obj = { method(a: string): number { return 5 + 5; } };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/.method-type-annotations/output.js
JavaScript
// @flow var obj = { method: function (a: string): number { return 5 + 5; } };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/method-plain/input.js
JavaScript
var obj = { method() { return 5 + 5; } };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/method-plain/output.js
JavaScript
var obj = { method: function () { return 5 + 5; } };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/proto/input.js
JavaScript
var shorthand = { __proto__, } var method = { __proto__() {} }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/proto/output.js
JavaScript
var shorthand = { ["__proto__"]: __proto__ }; var method = { ["__proto__"]: function () {} };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/shorthand-comments/input.js
JavaScript
var A = "a"; var o = { A // comment };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/shorthand-comments/output.js
JavaScript
var A = "a"; var o = { A: A // comment };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/shorthand-mixed/input.js
JavaScript
var coords = { x, y, foo: "bar" };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/shorthand-mixed/output.js
JavaScript
var coords = { x: x, y: y, foo: "bar" };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/shorthand-multiple/input.js
JavaScript
var coords = { x, y };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/shorthand-multiple/output.js
JavaScript
var coords = { x: x, y: y };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/shorthand-single/input.js
JavaScript
var coords = { x };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/shorthand_properties/shorthand-single/output.js
JavaScript
var coords = { x: x };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/class-binding/input.js
JavaScript
class Foo { static bar = 42; static { this.foo = Foo.bar; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/class-binding/output.js
JavaScript
class Foo { static bar = 42; static #_ = this.foo = Foo.bar; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/export-default/input.js
JavaScript
export default class Foo { #foo; static {} }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/export-default/output.js
JavaScript
export default class Foo { #foo; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/in-class-heritage/input.js
JavaScript
class Foo extends class extends class Base { static { this.qux = 21; } } { static { this.bar = 21; } } { static { this.foo = this.bar + this.qux; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/in-class-heritage/output.js
JavaScript
class Foo extends class extends class Base { static #_ = this.qux = 21; } { static #_ = this.bar = 21; } { static #_ = this.foo = this.bar + this.qux; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/multiple-static-initializers/input.js
JavaScript
class Foo { static #bar = 21; static { this.foo = this.#bar; this.qux1 = this.qux; } static qux = 21; static { this.qux2 = this.qux; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/multiple-static-initializers/output.js
JavaScript
class Foo { static #bar = 21; static #_ = (()=>{ this.foo = this.#bar; this.qux1 = this.qux; })(); static qux = 21; static #_2 = this.qux2 = this.qux; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/name-conflicts01/input.js
JavaScript
class Foo { static #_ = 42; static { this.foo = this.#_; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/name-conflicts01/output.js
JavaScript
class Foo { static #_ = 42; static #_2 = this.foo = this.#_; }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/name-conflicts02/input.js
JavaScript
class Foo { static #_ = 42; static #_1 = 42; static { this.foo = this.#_; this.bar = this.#_1; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/name-conflicts02/output.js
JavaScript
class Foo { static #_ = 42; static #_1 = 42; static #_2 = (() => { this.foo = this.#_; this.bar = this.#_1; })(); }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/new-target/input.js
JavaScript
class Base { constructor() { this.Foo = class { static { this.foo = new.target; } }; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/basic/new-target/output.js
JavaScript
class Base { constructor(){ this.Foo = class { static #_ = this.foo = new.target; }; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/class-properties/class-binding/input.js
JavaScript
class Foo { static bar = 42; static { this.foo = Foo.bar; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/class-properties/class-binding/output.js
JavaScript
class Foo { } _define_property(Foo, "bar", 42); Foo.foo = Foo.bar;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/class-properties/in-class-heritage/input.js
JavaScript
class Foo extends class extends class Base { static { this.qux = 21; } } { static { this.bar = 21; } } { static { this.foo = this.bar + this.qux; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/class-properties/in-class-heritage/output.js
JavaScript
var _Base, _class; class Foo extends (_class = class extends (_Base = class Base { }, _Base.qux = 21, _Base) { }, _class.bar = 21, _class) { } Foo.foo = Foo.bar + Foo.qux;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/class-properties/multiple-static-initializers/input.js
JavaScript
class Foo { static #bar = 21; static { this.foo = this.#bar; this.qux1 = this.qux; } static qux = 21; static { this.qux2 = this.qux; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/class-properties/multiple-static-initializers/output.js
JavaScript
class Foo { } var _bar = { writable: true, value: 21 }; (()=>{ Foo.foo = _class_static_private_field_spec_get(Foo, Foo, _bar); Foo.qux1 = Foo.qux; })(); _define_property(Foo, "qux", 21); Foo.qux2 = Foo.qux;
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/class-properties/name-conflict/input.js
JavaScript
class Foo { static #_ = 42; static { this.foo = this.#_; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/class-properties/name-conflict/output.js
JavaScript
class Foo { } var __ = { writable: true, value: 42 }; Foo.foo = _class_static_private_field_spec_get(Foo, Foo, __);
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/class-properties/new-target/input.js
JavaScript
class Base { constructor() { this.Foo = class { static { this.foo = new.target; } }; } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/class-properties/new-target/output.js
JavaScript
class Base { constructor(){ var _class; this.Foo = (_class = class { }, _class.foo = void 0, _class); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/issue-7106/input.js
JavaScript
export class test { #throw() { } #new() { } test() { this.#throw(); this.#new(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_compat/tests/static-blocks/issue-7106/output.js
JavaScript
export class test { #throw() {} #new() {} test() { this.#throw(); this.#new(); } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_macros/src/common.rs
Rust
/// Type of the visitor. #[derive(Debug, Clone, Copy)] pub enum Mode { Fold, VisitMut, } impl Mode { pub fn prefix(self) -> &'static str { match self { Mode::Fold => "fold", Mode::VisitMut => "visit_mut", } } }
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University