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/src/export_default_from.rs
Rust
use swc_common::DUMMY_SP; use swc_ecma_ast::*; use swc_ecma_utils::quote_ident; use swc_ecma_visit::{noop_visit_mut_type, visit_mut_pass, VisitMut}; /// `@babel/plugin-proposal-export-default-from` pub fn export_default_from() -> impl Pass { visit_mut_pass(ExportDefaultFrom) } struct ExportDefaultFrom; impl Visi...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/src/import_attributes.rs
Rust
use swc_ecma_ast::{ExportAll, ImportDecl, NamedExport, Pass}; use swc_ecma_visit::{noop_visit_mut_type, visit_mut_pass, VisitMut}; pub fn import_attributes() -> impl Pass { visit_mut_pass(ImportAssertions) } struct ImportAssertions; impl VisitMut for ImportAssertions { noop_visit_mut_type!(); fn visit_m...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/src/lib.rs
Rust
#![deny(clippy::all)] #![allow(clippy::vec_box)] use serde::{Deserialize, Serialize}; pub use self::{ decorators::decorators, export_default_from::export_default_from, import_attributes::import_attributes, }; #[derive(Debug, Default, Clone, Copy, Serialize, Deserialize)] #[serde(deny_unknown_fields, rename_a...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/__swc_snapshots__/tests/export.rs/default_compounded_es6.js
JavaScript
export { default as v, x, y as w } from "mod";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/__swc_snapshots__/tests/export.rs/default_es6.js
JavaScript
export { default as foo } from "bar";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/__swc_snapshots__/tests/export.rs/namespace_compound_es6.js
JavaScript
import * as _foo from 'bar'; export { _foo as foo }; export { bar } from 'bar';
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/__swc_snapshots__/tests/export.rs/namespace_default.js
JavaScript
import * as _default from 'foo'; export { _default as default };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/__swc_snapshots__/tests/export.rs/namespace_es6.js
JavaScript
import * as _foo from 'bar'; export { _foo as foo };
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/__swc_snapshots__/tests/import_assertions.rs/export_all_with_assertions.js
JavaScript
export * from "./test.json";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/__swc_snapshots__/tests/import_assertions.rs/import_with_assertions.js
JavaScript
import test from "./test.json";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/__swc_snapshots__/tests/import_assertions.rs/named_export_with_assertions.js
JavaScript
export { default as test } from "./test.json";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/__swc_snapshots__/tests/import_assertions.rs/side_effect_import_with_assertions.js
JavaScript
import "./test.json";
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Basic-instance-auto-accessor.js
JavaScript
(() => { const dec = (key, getName, setName) => (target, ctx) => { assertEq(() => typeof target.get, 'function'); assertEq(() => typeof target.set, 'function'); assertEq(() => target.get.name, getName); assertEq(() => target.set.name, setName); assertEq(() => ctx.kind, 'acces...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Basic-private-instance-auto-accessor.js
JavaScript
(() => { let lateAsserts; const dec = (target, ctx) => { assertEq(() => typeof target.get, 'function'); assertEq(() => typeof target.set, 'function'); assertEq(() => target.get.name, 'get #foo'); assertEq(() => target.set.name, 'set #foo'); assertEq(() => ctx.kind, 'acces...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Basic-private-static-auto-accessor.js
JavaScript
(() => { let lateAsserts; const dec = (target, ctx) => { assertEq(() => typeof target.get, 'function'); assertEq(() => typeof target.set, 'function'); assertEq(() => target.get.name, 'get #foo'); assertEq(() => target.set.name, 'set #foo'); assertEq(() => ctx.kind, 'acces...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Basic-static-auto-accessor.js
JavaScript
(() => { const dec = (key, getName, setName) => (target, ctx) => { assertEq(() => typeof target.get, 'function'); assertEq(() => typeof target.set, 'function'); assertEq(() => target.get.name, getName); assertEq(() => target.set.name, setName); assertEq(() => ctx.kind, 'acces...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Extra-initializer-instance-auto-accessor.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (target, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.a...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Extra-initializer-private-instance-auto-accessor.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (target, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.a...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Extra-initializer-private-static-auto-accessor.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (target, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.a...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Extra-initializer-static-auto-accessor.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (target, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.a...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Return-null-instance-auto-accessor.js
JavaScript
(() => { assertThrows(() => { const dec = (target, ctx) => { return null; }; class Foo { @dec accessor foo; } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Return-null-private-instance-auto-accessor.js
JavaScript
(() => { assertThrows(() => { const dec = (target, ctx) => { return null; }; class Foo { @dec accessor #foo; } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Return-null-private-static-auto-accessor.js
JavaScript
(() => { assertThrows(() => { const dec = (target, ctx) => { return null; }; class Foo { @dec static accessor #foo; } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Return-null-static-auto-accessor.js
JavaScript
(() => { assertThrows(() => { const dec = (target, ctx) => { return null; }; class Foo { @dec static accessor foo; } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Shim-instance-auto-accessor.js
JavaScript
(() => { let get; let set; const dec = (target, ctx) => { function init(x) { assertEq(() => this instanceof Foo, true); return x + 1; } get = function () { return target.get.call(this) * 10; }; set = function (x) { target.set.call(this, x * 2); }; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Shim-private-instance-auto-accessor.js
JavaScript
(() => { let get; let set; const dec = (target, ctx) => { function init(x) { assertEq(() => this instanceof Foo, true); return x + 1; } get = function () { return target.get.call(this) * 10; }; set = function (x) { target.set.call(this, x * 2); }; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Shim-private-static-auto-accessor.js
JavaScript
(() => { let foo; let get; let set; const dec = (target, ctx) => { function init(x) { assertEq(() => this, foo); return x + 1; } get = function () { return target.get.call(this) * 10; }; set = function (x) { target.set.call(this, x * 2); }; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Auto-accessor-decorators-Shim-static-auto-accessor.js
JavaScript
(() => { let foo; let get; let set; const dec = (target, ctx) => { function init(x) { assertEq(() => this, foo); return x + 1; } get = function () { return target.get.call(this) * 10; }; set = function (x) { target.set.call(this, x * 2); }; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Basic-expression-Anonymous.js
JavaScript
(() => { let old; const dec = (name) => (cls, ctx) => { assertEq(() => typeof cls, 'function'); assertEq(() => cls.name, name); assertEq(() => ctx.kind, 'class'); assertEq(() => ctx.name, name); assertEq(() => 'static' in ctx, false); assertEq(() => 'private' in c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Basic-expression-Array-binding.js
JavaScript
(() => { let old; const dec = (name) => (cls, ctx) => { assertEq(() => typeof cls, 'function'); assertEq(() => cls.name, name); assertEq(() => ctx.kind, 'class'); assertEq(() => ctx.name, name); assertEq(() => 'static' in ctx, false); assertEq(() => 'private' in c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Basic-expression-Assignment-array-binding.js
JavaScript
(() => { let old; const dec = (name) => (cls, ctx) => { assertEq(() => typeof cls, 'function'); assertEq(() => cls.name, name); assertEq(() => ctx.kind, 'class'); assertEq(() => ctx.name, name); assertEq(() => 'static' in ctx, false); assertEq(() => 'private' in c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Basic-expression-Assignment-initializer.js
JavaScript
(() => { let old; const dec = (name) => (cls, ctx) => { assertEq(() => typeof cls, 'function'); assertEq(() => cls.name, name); assertEq(() => ctx.kind, 'class'); assertEq(() => ctx.name, name); assertEq(() => 'static' in ctx, false); assertEq(() => 'private' in c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Basic-expression-Assignment-object-binding.js
JavaScript
(() => { let old; const dec = (name) => (cls, ctx) => { assertEq(() => typeof cls, 'function'); assertEq(() => cls.name, name); assertEq(() => ctx.kind, 'class'); assertEq(() => ctx.name, name); assertEq(() => 'static' in ctx, false); assertEq(() => 'private' in c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Basic-expression-Instance-auto-accessor-initializer.js
JavaScript
(() => { let old; const dec = (name) => (cls, ctx) => { assertEq(() => typeof cls, 'function'); assertEq(() => cls.name, name); assertEq(() => ctx.kind, 'class'); assertEq(() => ctx.name, name); assertEq(() => 'static' in ctx, false); assertEq(() => 'private' in c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Basic-expression-Instance-field-initializer.js
JavaScript
(() => { let old; const dec = (name) => (cls, ctx) => { assertEq(() => typeof cls, 'function'); assertEq(() => cls.name, name); assertEq(() => ctx.kind, 'class'); assertEq(() => ctx.name, name); assertEq(() => 'static' in ctx, false); assertEq(() => 'private' in c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Basic-expression-Object-binding.js
JavaScript
(() => { let old; const dec = (name) => (cls, ctx) => { assertEq(() => typeof cls, 'function'); assertEq(() => cls.name, name); assertEq(() => ctx.kind, 'class'); assertEq(() => ctx.name, name); assertEq(() => 'static' in ctx, false); assertEq(() => 'private' in c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Basic-expression-Property-value.js
JavaScript
(() => { let old; const dec = (name) => (cls, ctx) => { assertEq(() => typeof cls, 'function'); assertEq(() => cls.name, name); assertEq(() => ctx.kind, 'class'); assertEq(() => ctx.name, name); assertEq(() => 'static' in ctx, false); assertEq(() => 'private' in c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Basic-expression-Static-auto-accessor-initializer.js
JavaScript
(() => { let old; const dec = (name) => (cls, ctx) => { assertEq(() => typeof cls, 'function'); assertEq(() => cls.name, name); assertEq(() => ctx.kind, 'class'); assertEq(() => ctx.name, name); assertEq(() => 'static' in ctx, false); assertEq(() => 'private' in c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Basic-expression-Static-field-initializer.js
JavaScript
(() => { let old; const dec = (name) => (cls, ctx) => { assertEq(() => typeof cls, 'function'); assertEq(() => cls.name, name); assertEq(() => ctx.kind, 'class'); assertEq(() => ctx.name, name); assertEq(() => 'static' in ctx, false); assertEq(() => 'private' in c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Basic-expression-Variable-initializer.js
JavaScript
(() => { let old; const dec = (name) => (cls, ctx) => { assertEq(() => typeof cls, 'function'); assertEq(() => cls.name, name); assertEq(() => ctx.kind, 'class'); assertEq(() => ctx.name, name); assertEq(() => 'static' in ctx, false); assertEq(() => 'private' in c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Basic-statement.js
JavaScript
(() => { let old; const dec = (name) => (cls, ctx) => { assertEq(() => typeof cls, 'function'); assertEq(() => cls.name, name); assertEq(() => ctx.kind, 'class'); assertEq(() => ctx.name, name); assertEq(() => 'static' in ctx, false); assertEq(() => 'private' in c...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Binding-initialization-class-expression.js
JavaScript
(() => { let old; let block; class Bar { } const dec = (cls, ctx) => { old = cls; return Bar; }; const Foo = @dec class Foo { static { block = Foo; } method() { return Foo; } static method() { return Foo; } field = Foo; static ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Binding-initialization-class-statement.js
JavaScript
(() => { let old; let block; class Bar { } const dec = (cls, ctx) => { old = cls; return Bar; }; @dec class Foo { static { block = Foo; } method() { return Foo; } static method() { return Foo; } field = Foo; static field = Foo; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Extra-initializer.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (cls, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.addI...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Order.js
JavaScript
(() => { const log = []; let Bar; let Baz; const dec1 = (cls, ctx) => { log.push(2); Bar = function () { log.push(4); return new cls; }; return Bar; }; const dec2 = (cls, 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/Class-decorators-Return-null.js
JavaScript
(() => { assertThrows(() => { const dec = (cls, ctx) => { return null; }; @dec class Foo { } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Class-decorators-Return-object.js
JavaScript
(() => { assertThrows(() => { const dec = (cls, ctx) => { return {}; }; @dec class Foo { } }, TypeError); })();
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-list-evaluation-Class-binding-class-expression.js
JavaScript
(() => { const fns = []; const capture = (fn) => { fns.push(fn); return () => { }; }; const originalFoo = ( @(capture(() => Foo)) class Foo { @(capture(() => Foo)) method() { } @(capture(() => Foo)) static method() { } @(capture(() => Foo))...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-list-evaluation-Class-binding-class-statement.js
JavaScript
(() => { const fns = []; const capture = (fn) => { fns.push(fn); // Note: As far as I can tell, early reference to the class name should // throw a reference error because: // // 1. Class decorators run first in the top-level scope before entering // BindingCla...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-list-evaluation-Computed-names-class-expression.js
JavaScript
(() => { const log = []; const foo = (n) => { log.push(n); return () => { }; }; const computed = { get method() { log.push(log.length); return Symbol('method'); }, get field() { log.push(log.length); return Symbol('field'); }, get getter() { log.push(log.length); ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-list-evaluation-Computed-names-class-statement.js
JavaScript
(() => { const log = []; const foo = (n) => { log.push(n); return () => { }; }; const computed = { get method() { log.push(log.length); return Symbol('method'); }, get field() { log.push(log.length); return Symbol('field'); }, get getter() { log.push(log.length); ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-list-evaluation-Inner-private-name-class-expression.js
JavaScript
(() => { const fns = []; const capture = (fn) => { fns.push(fn); return () => { }; }; class Outer { static #foo = 0; static { ( @(capture(() => Outer.#foo + 0)) class Foo { #foo = 10; @(capture(() => new ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-list-evaluation-Inner-private-name-class-statement.js
JavaScript
(() => { const fns = []; const capture = (fn) => { fns.push(fn); return () => { }; }; class Dummy { static #foo = NaN; static { @(capture(() => new Foo().#foo + 0)) class Foo { #foo = 10; @(capture(() => new Foo().#f...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-list-evaluation-Outer-private-name-class-expression.js
JavaScript
(() => { const log = []; class Dummy { static #foo(n) { log.push(n); return () => { }; } static { const dummy = this; ( @(dummy.#foo(0)) class extends (dummy.#foo(1), Object) { @(dummy.#foo(2)) ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-list-evaluation-Outer-private-name-class-statement.js
JavaScript
(() => { const log = []; class Dummy { static #foo(n) { log.push(n); return () => { }; } static { const dummy = this; @(dummy.#foo(0)) class Foo extends (dummy.#foo(1), Object) { @(dummy.#foo(2)) ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-list-evaluation-await-class-expression.js
JavaScript
(async () => { const log = []; const dummy = () => { }; async function wrapper() { ( @(log.push(await Promise.resolve(0)), dummy) class extends (log.push(await Promise.resolve(1)), Object) { @(log.push(await Promise.resolve(2)), dummy) method() { } ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-list-evaluation-await-class-statement.js
JavaScript
(async () => { const log = []; const dummy = () => { }; async function wrapper() { @(log.push(await Promise.resolve(0)), dummy) class Foo extends (log.push(await Promise.resolve(1)), Object) { @(log.push(await Promise.resolve(2)), dummy) method() { } @(log...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-list-evaluation-this-class-expression.js
JavaScript
(() => { const log = []; const dummy = () => { }; const ctx = { foo(n) { log.push(n); } }; function wrapper() { ( @(assertEq(() => this.foo(0), undefined), dummy) class extends (assertEq(() => this.foo(1), undefined), Object) { @(assert...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-list-evaluation-this-class-statement.js
JavaScript
(() => { const log = []; const dummy = () => { }; const ctx = { foo(n) { log.push(n); } }; function wrapper() { @(assertEq(() => this.foo(0), undefined), dummy) class Foo extends (assertEq(() => this.foo(1), undefined), Object) { @(assertEq(() ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-metadata-class-expression.js
JavaScript
(() => { let counter = 0; const dec = (_, ctx) => { ctx.metadata[ctx.name] = counter++; }; const Foo = @dec class { @dec instanceField; @dec accessor instanceAccessor; @dec instanceMethod() { } @dec get instanceGetter() { r...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Decorator-metadata-class-statement.js
JavaScript
(() => { let counter = 0; const dec = (_, ctx) => { ctx.metadata[ctx.name] = counter++; }; @dec class Foo { @dec instanceField; @dec accessor instanceAccessor; @dec instanceMethod() { } @dec get instanceGetter() { return; } ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Basic-instance-field.js
JavaScript
(() => { const dec = (key) => (value, ctx) => { assertEq(() => value, undefined); assertEq(() => ctx.kind, 'field'); assertEq(() => ctx.name, key); assertEq(() => ctx.static, false); assertEq(() => ctx.private, false); assertEq(() => ctx.access.has({ [key]: false }), ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Basic-private-instance-field.js
JavaScript
(() => { let lateAsserts; const dec = (value, ctx) => { assertEq(() => value, undefined); assertEq(() => ctx.kind, 'field'); assertEq(() => ctx.name, '#foo'); assertEq(() => ctx.static, false); assertEq(() => ctx.private, true); lateAsserts = () => { a...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Basic-private-static-field.js
JavaScript
(() => { let lateAsserts; const dec = (value, ctx) => { assertEq(() => value, undefined); assertEq(() => ctx.kind, 'field'); assertEq(() => ctx.name, '#foo'); assertEq(() => ctx.static, true); assertEq(() => ctx.private, true); lateAsserts = () => { as...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Basic-static-field.js
JavaScript
(() => { const dec = (key) => (value, ctx) => { assertEq(() => value, undefined); assertEq(() => ctx.kind, 'field'); assertEq(() => ctx.name, key); assertEq(() => ctx.static, true); assertEq(() => ctx.private, false); assertEq(() => ctx.access.has({ [key]: false }), t...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Extra-initializer-instance-field.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (value, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.ad...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Extra-initializer-private-instance-field.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (value, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.ad...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Extra-initializer-private-static-field.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (value, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.ad...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Extra-initializer-static-field.js
JavaScript
(() => { let oldAddInitializer; let got; const dec = (value, ctx) => { ctx.addInitializer(function (...args) { got = { this: this, args }; }); if (oldAddInitializer) assertThrows(() => oldAddInitializer(() => { }), TypeError); assertThrows(() => ctx.ad...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Order-instance-field.js
JavaScript
(() => { const log = []; const dec1 = (value, ctx) => { log.push(2); return () => log.push(4); }; const dec2 = (value, ctx) => { log.push(1); return () => log.push(5); }; log.push(0); class Foo { @dec1 @dec2 foo = 123; } log.pus...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Order-private-instance-field.js
JavaScript
(() => { const log = []; const dec1 = (value, ctx) => { log.push(2); return () => log.push(4); }; const dec2 = (value, ctx) => { log.push(1); return () => log.push(5); }; log.push(0); let get$foo; class Foo { @dec1 @dec2 #foo = 123;...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Order-private-static-field.js
JavaScript
(() => { const log = []; const dec1 = (value, ctx) => { log.push(2); return () => log.push(3); }; const dec2 = (value, ctx) => { log.push(1); return () => log.push(4); }; log.push(0); let get$foo; class Foo { @dec1 @dec2 static #foo...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Order-static-field.js
JavaScript
(() => { const log = []; const dec1 = (value, ctx) => { log.push(2); return () => log.push(3); }; const dec2 = (value, ctx) => { log.push(1); return () => log.push(4); }; log.push(0); class Foo { @dec1 @dec2 static foo = 123; } ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Return-null-instance-field.js
JavaScript
(() => { assertThrows(() => { const dec = (value, 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/Field-decorators-Return-null-private-instance-field.js
JavaScript
(() => { assertThrows(() => { const dec = (value, 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/Field-decorators-Return-null-private-static-field.js
JavaScript
(() => { assertThrows(() => { const dec = (value, 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/Field-decorators-Return-null-static-field.js
JavaScript
(() => { assertThrows(() => { const dec = (value, 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/Field-decorators-Return-object-instance-field.js
JavaScript
(() => { assertThrows(() => { const dec = (value, 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/Field-decorators-Return-object-private-instance-field.js
JavaScript
(() => { assertThrows(() => { const dec = (value, 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/Field-decorators-Return-object-private-static-field.js
JavaScript
(() => { assertThrows(() => { const dec = (value, 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/Field-decorators-Return-object-static-field.js
JavaScript
(() => { assertThrows(() => { const dec = (value, 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/Field-decorators-Shim-instance-field.js
JavaScript
(() => { let log = []; const dec = (value, ctx) => { return function (x) { assertEq(() => this instanceof Foo, true); return log.push('foo' in this, 'bar' in this, x); }; }; class Foo { @dec foo = 123; @dec bar; } assertEq((...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Shim-private-instance-field.js
JavaScript
(() => { let log = []; const dec = (value, ctx) => { return function (x) { assertEq(() => this instanceof Foo, true); return log.push(has$foo(this), has$bar(this), x); }; }; let has$foo; let has$bar; let get$foo; let get$bar; class Foo { @d...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Shim-private-static-field.js
JavaScript
(() => { let foo; let log = []; const dec = (value, ctx) => { return function (x) { assertEq(() => this, foo); return log.push(has$foo(this), has$bar(this), x); }; }; assertEq(() => log + '', ''); let has$foo; let has$bar; let get$foo; let get$...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Field-decorators-Shim-static-field.js
JavaScript
(() => { let foo; let log = []; const dec = (value, ctx) => { return function (x) { assertEq(() => this, foo); return log.push('foo' in this, 'bar' in this, x); }; }; assertEq(() => log + '', ''); class Foo { static { foo = Foo; ...
willcrichton/ilc-swc
1
Rust
willcrichton
Will Crichton
Brown University
crates/swc_ecma_transforms_proposal/tests/decorator-evanw-split/Getter-decorators-Basic-instance-getter.js
JavaScript
(() => { const dec = (key, name) => (fn, ctx) => { assertEq(() => typeof fn, 'function'); assertEq(() => fn.name, name); assertEq(() => ctx.kind, 'getter'); 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/Getter-decorators-Basic-private-instance-getter.js
JavaScript
(() => { let lateAsserts; const dec = (fn, ctx) => { assertEq(() => typeof fn, 'function'); assertEq(() => fn.name, 'get #foo'); assertEq(() => ctx.kind, 'getter'); 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/Getter-decorators-Basic-private-static-getter.js
JavaScript
(() => { let lateAsserts; const dec = (fn, ctx) => { assertEq(() => typeof fn, 'function'); assertEq(() => fn.name, 'get #foo'); assertEq(() => ctx.kind, 'getter'); 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/Getter-decorators-Basic-static-getter.js
JavaScript
(() => { const dec = (key, name) => (fn, ctx) => { assertEq(() => typeof fn, 'function'); assertEq(() => fn.name, name); assertEq(() => ctx.kind, 'getter'); 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/Getter-decorators-Extra-initializer-instance-getter.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/Getter-decorators-Extra-initializer-private-instance-getter.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/Getter-decorators-Extra-initializer-private-static-getter.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/Getter-decorators-Extra-initializer-static-getter.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/Getter-decorators-Order-instance-getter.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/Getter-decorators-Order-private-instance-getter.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/Getter-decorators-Order-private-static-getter.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/Getter-decorators-Order-static-getter.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/Getter-decorators-Return-null-instance-getter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return null; }; 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-null-private-instance-getter.js
JavaScript
(() => { assertThrows(() => { const dec = (fn, ctx) => { return null; }; 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-null-private-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