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_parser/tests/typescript/stc/0001/input.ts | TypeScript | var obj2 = {
0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false,
}
obj2["9.671406556917009e+24"]; // boolean
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/stc/0002/input.ts | TypeScript | obj2[9.671406556917009e+24]; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/template-literal-type/input.ts | TypeScript | type MyAlias = `some-value`;
type OtherAlias =
| `some`
| `text`;
type MultiLine = `
some value
`;
type WithTypes = `with-a-${string}`;
type WithTypes2 = `with-a-${MyAlias}-end`;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/top-level-await/input.ts | TypeScript | await 1 + 2
await 1 * 2
await 1 || 2
await null ?? 3
await a instanceof await b
await a in await b
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/ts-import-type/input.ts | TypeScript | type Vite = typeof import("vite", {
with: {
"resolution-mode": "import"
}
});
type Vite2 = typeof import("vite",);
type Vite3 = typeof import("vite");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/tsx/brace-is-block/input.ts | TypeScript | // Regression test for tokenizer bug where the `{` after `<T>` was considered a JSX interpolation.
class C extends D<T> {}
<C/>
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/tsx/type-arguments/input.ts | TypeScript | f<T>();
new C<T>();
type A = T<T>; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/tsx/type-parameters/input.ts | TypeScript | function f(): <T>() => number {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/type-alias/declare/input.ts | TypeScript | declare type T = number;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/type-alias/export/input.ts | TypeScript | export type T = number;
// `export default type` is not valid.
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/type-alias/generic-complex/input.ts | TypeScript | type T<U extends object = { x: number }> = Array<U>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/type-alias/generic/input.ts | TypeScript | type T<U> = U;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/type-alias/plain/input.ts | TypeScript | type T = number;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/type-arguments/call/input.ts | TypeScript | f<T>();
f<T, U>();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/type-arguments/new-false-positive/input.ts | TypeScript | new A < T;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/type-arguments/new/input.ts | TypeScript | new C<T>();
new C<T, U>();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/type-arguments/tagged-template-no-asi/input.ts | TypeScript | new C<T>
``
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/type-arguments/tagged-template/input.ts | TypeScript | f<T>``;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/type-arguments/tsx/input.ts | TypeScript | <C<number>></C>;
<C<number>/>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/type-arguments/whitespace/input.ts | TypeScript | function f< T >() {} | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/array/input.ts | TypeScript | let arr: number[][];
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/basic/input.ts | TypeScript | type X1<T extends any[]> =
T extends [infer U extends string] ? ["string", U] :
T extends [infer U extends number] ? ["number", U] :
never;
type X2<T extends (...args: any[]) => void> =
T extends (a: infer U extends string) => void ? ["string", U] :
T extends (a: infer U extends number) => void ? [... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/distinguishing/input.ts | TypeScript | type X10<T> = T extends (infer U extends number ? 1 : 0) ? 1 : 0; // ok, parsed as conditional
type X11<T> = T extends ((infer U) extends number ? 1 : 0) ? 1 : 0; // ok, parsed as conditional
type X12<T> = T extends (infer U extends number) ? 1 : 0; // ok, parsed as `infer..extends` (no trailing `?`)
type X13<T> = T ex... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/conditional-infer/input.ts | TypeScript | type Element<T> = T extends (infer U)[] ? U : T;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/conditional/input.ts | TypeScript | let x: number extends string ? boolean : null;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/function-generic/input.ts | TypeScript | let f: <T>(a: T) => T;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/function-in-generic/input.ts | TypeScript | let x: Array<() => void>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/function-with-this/input.ts | TypeScript | let f: (this: number) => void;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/function/input.ts | TypeScript | let f: (a: number, b?: number, ...c: number[]) => void;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/indexed/input.ts | TypeScript | let x: T[K];
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/keywords/input.ts | TypeScript | let a: any;
let un: unknown;
let b: boolean;
let ne: never;
let nul: null;
let num: number;
let o: object;
let st: string;
let sy: symbol;
let u: undefined;
let v: void;
let n: bigint;
let i: intrinsic;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/literal-boolean/input.ts | TypeScript | let x: true;
let x: false;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/literal-number-negative/input.ts | TypeScript | let x: -1;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/literal-number/input.ts | TypeScript | let x: 0;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/literal-string/input.ts | TypeScript | let x: "foo";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/mapped/input.ts | TypeScript | let map: { [P in string]: number; };
let map: { readonly [P in string]?: number; };
let map: { +readonly [P in string]+?: number; };
let map: { -readonly [P in string]-?: number };
let map: { [P in string as string]: number };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/object-shorthand/input.ts | TypeScript | const table = {
put<T extends { id: string }>(value: T) {
// actually put.
}
};
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/parenthesized/input.ts | TypeScript | type T = ({});
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/reference-generic-nested/input.ts | TypeScript | let x: Array<Array<number>>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/reference-generic/input.ts | TypeScript | let x: Array<number>;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/reference/input.ts | TypeScript | let x: T;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/tuple-empty/input.ts | TypeScript | let x: [];
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/tuple-optional/input.ts | TypeScript | let x: [string, number?, (string | number)?]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/tuple-rest-after-optional/input.ts | TypeScript | function foo(...args: [number, string?, ...number[]]) {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/tuple-rest/input.ts | TypeScript | let x: [string, ...number[]]
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/tuple/input.ts | TypeScript | let x: [number, number, number];
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/type-literal/input.ts | TypeScript | let obj: { x: number };
// Type literals have the same body syntax as interfaces, so see `interface` directory for that.
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/type-operator/input.ts | TypeScript | let x: keyof T;
let y: unique symbol;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/typeof/input.ts | TypeScript | let x: typeof y.z;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/types/union-intersection/input.ts | TypeScript | let union: number | null | undefined;
let intersection: number & string;
let precedence1: number | string & boolean;
let precedence2: number & string | boolean;
type LeadingUnion =
| string
| number;
type LeadingIntersection =
& number
& string;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/v4/issue-864/input.ts | TypeScript | type Strings = [string, string];
type Numbers = [number, number];
// [string, string, number, number]
type StrStrNumNum = [...Strings, ...Numbers]; // works now | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/v4/issue-865/input.ts | TypeScript | type Range = [start: number, end: number];
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/v4/issue-866/input.ts | TypeScript | a &&= b;
a ||= b;
a ??= b; | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/v4/issue-941/input.ts | TypeScript | try {
} catch (e: unknown) {
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/v4/optional-tuple-element/input.ts | TypeScript | type Foo = [first: number, second?: string, ...rest: any[]];
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/variable-declarator/definite-assignment/input.ts | TypeScript | let x!: number;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/variance-annotations/1/input.ts | TypeScript | type Covariant<out T> = {
x: T;
}
declare let super_covariant: Covariant<unknown>;
declare let sub_covariant: Covariant<string>;
super_covariant = sub_covariant;
sub_covariant = super_covariant; // Error
type Contravariant<in T> = {
f: (x: T) => void;
}
declare let super_contravariant: Contravariant<unknow... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/variance-annotations/with_jsx/input.tsx | TypeScript (TSX) | type Covariant<out T> = {
x: T;
}
declare let super_covariant: Covariant<unknown>;
declare let sub_covariant: Covariant<string>;
super_covariant = sub_covariant;
sub_covariant = super_covariant; // Error
type Contravariant<in T> = {
f: (x: T) => void;
}
declare let super_contravariant: Contravariant<unknow... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_parser/tests/typescript/vercel/web-875/input.ts | TypeScript |
export async function postProcessHTML(
) {
const postProcessors: Array<PostProcessorFunction> = [
process.env.NEXT_RUNTIME !== 'edge' && inAmpMode
? async (html: string) => {
const optimizeAmp = require('./optimize-amp')
.default as typeof import('./optimize... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/benches/polyfills.rs | Rust | use codspeed_criterion_compat::{black_box, criterion_group, criterion_main, Bencher, Criterion};
use swc_common::{comments::SingleThreadedComments, FileName, Mark};
use swc_ecma_ast::Program;
use swc_ecma_parser::{Parser, StringInput, Syntax};
use swc_ecma_preset_env::{preset_env, Config};
use swc_ecma_transforms::help... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/scripts/copy-data.js | JavaScript | const fs = require("fs");
const path = require("path");
const nodeModulesDirectory = path.join(
__dirname,
"..",
"..",
"..",
"node_modules"
);
/**
*
* @param {string} s
*/
function copy(s) {
console.log(`es/preset-env: Copying ${s}`);
const targetPath = path.join(__dirname, "..", "data"... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/corejs2/builtin.rs | Rust | use once_cell::sync::Lazy;
use rustc_hash::FxHashMap;
use crate::{BrowserData, Versions};
pub(crate) static BUILTINS: Lazy<FxHashMap<String, Versions>> = Lazy::new(|| {
let map: FxHashMap<_, BrowserData<Option<String>>> =
serde_json::from_str(include_str!("builtin.json")).expect("failed to parse json");
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/corejs2/data.rs | Rust | use crate::util::DataMap;
static ARRAY_NATURE_ITERATORS: &[&str] = &[
"es6.object.to-string",
"es6.array.iterator",
"web.dom.iterable",
];
static COMMON_ITERATORS: &[&str] = &[
"es6.string.iterator",
"es6.object.to-string",
"es6.array.iterator",
"web.dom.iterable",
];
static PROMISE_DEPEN... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/corejs2/entry.rs | Rust | use std::sync::Arc;
use indexmap::IndexSet;
use preset_env_base::{version::should_enable, Versions};
use rustc_hash::FxBuildHasher;
use swc_atoms::atom;
use swc_common::DUMMY_SP;
use swc_ecma_ast::*;
use swc_ecma_visit::{noop_visit_mut_type, VisitMut, VisitMutWith};
use super::builtin::BUILTINS;
#[derive(Debug)]
pub... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/corejs2/mod.rs | Rust | use std::sync::Arc;
use indexmap::IndexSet;
use preset_env_base::{version::should_enable, Versions};
use rustc_hash::FxBuildHasher;
use swc_atoms::Atom;
use swc_ecma_ast::*;
use swc_ecma_visit::{noop_visit_type, Visit, VisitWith};
pub(crate) use self::entry::Entry;
use self::{
builtin::BUILTINS,
data::{BUILTI... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/corejs3/builtin.rs | Rust | use once_cell::sync::Lazy;
use crate::util::{descriptor, CoreJSPolyfillDescriptor, ObjectMap, ObjectMap2};
fn dynamic_concat(a: &[&'static str], b: &[&'static str]) -> &'static [&'static str] {
let mut res = Vec::with_capacity(a.len() + b.len());
res.extend_from_slice(a);
res.extend_from_slice(b);
r... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/corejs3/compat.rs | Rust | //! Ported from https://github.com/zloirock/core-js/tree/master/packages/core-js-compat
use once_cell::sync::Lazy;
use rustc_hash::FxHashMap;
use crate::Versions;
pub static DATA: Lazy<FxHashMap<String, Versions>> = Lazy::new(|| {
serde_json::from_str(include_str!("../../data/core-js-compat/data.json"))
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/corejs3/data.rs | Rust | use once_cell::sync::Lazy;
use preset_env_base::version::Version;
use rustc_hash::FxHashMap;
pub static POSSIBLE_GLOBAL_OBJECTS: &[&str] = &["global", "globalThis", "self", "window"];
pub static MODULES_BY_VERSION: Lazy<FxHashMap<&'static str, Version>> = Lazy::new(|| {
serde_json::from_str::<FxHashMap<_, _>>(inc... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/corejs3/entry.rs | Rust | use std::sync::Arc;
use indexmap::IndexSet;
use once_cell::sync::Lazy;
use preset_env_base::{
version::{should_enable, Version},
Versions,
};
use rustc_hash::{FxBuildHasher, FxHashMap};
use swc_atoms::atom;
use swc_common::DUMMY_SP;
use swc_ecma_ast::*;
use swc_ecma_visit::VisitMut;
use super::{compat::DATA a... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/corejs3/mod.rs | Rust | pub(crate) use self::{entry::Entry, usage::UsageVisitor};
mod builtin;
mod compat;
mod data;
mod entry;
mod usage;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/corejs3/usage.rs | Rust | use std::sync::Arc;
use indexmap::IndexSet;
use preset_env_base::version::{should_enable, Version};
use rustc_hash::FxBuildHasher;
use swc_atoms::Atom;
use swc_ecma_ast::*;
use swc_ecma_visit::{noop_visit_type, Visit, VisitWith};
use super::{
builtin::{
BUILT_INS, COMMON_ITERATORS, INSTANCE_PROPERTIES, PR... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/lib.rs | Rust | #![deny(clippy::all)]
#![allow(dead_code)]
#![recursion_limit = "256"]
use std::{path::PathBuf, sync::Arc};
use preset_env_base::query::targets_to_versions;
pub use preset_env_base::{query::Targets, version::Version, BrowserData, Versions};
use rustc_hash::FxHashSet;
use serde::Deserialize;
use swc_atoms::{atom, Atom... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/regenerator/mod.rs | Rust | pub(super) fn is_required<T>(_: &T) -> bool {
false
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/transform_data.rs | Rust | use once_cell::sync::Lazy;
use preset_env_base::{
version::{should_enable, Version},
BrowserData, Versions,
};
use rustc_hash::FxHashMap;
use string_enum::StringEnum;
impl Feature {
pub fn should_enable(self, target: &Versions, bugfixes: bool, default: bool) -> bool {
let f = if bugfixes {
... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/src/util.rs | Rust | use rustc_hash::FxHashMap;
pub(crate) type ObjectMap<T> = FxHashMap<&'static str, T>;
pub(crate) type ObjectMap2<V> = ObjectMap<ObjectMap<V>>;
pub(crate) fn descriptor(
pure: Option<&'static str>,
global: &'static [&'static str],
name: Option<&'static str>,
exclude: &'static [&'static str],
) -> CoreJ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-all-orig/input.mjs | JavaScript | Array.from; // static method
Map; // built-in
new Promise(); // new builtin
Symbol.match; // as member expression
_arr[Symbol.iterator](); // Symbol.iterator
// no import
Array.asdf;
Array2.from;
Map2;
new Promise2();
Symbol.asdf;
Symbol2.match;
_arr9[Symbol2.iterator]();
_arr9[Symbol.iterator2]();
G.assign; // stati... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-all-orig/output.mjs | JavaScript | import "core-js/modules/es7.symbol.async-iterator";
import "core-js/modules/es6.symbol";
import "core-js/modules/es6.regexp.match";
import "core-js/modules/es6.promise";
import "core-js/modules/web.dom.iterable";
import "core-js/modules/es6.array.iterator";
import "core-js/modules/es6.object.to-string";
import "core-js... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-browserslist-config-ignore/input.mjs | JavaScript | const a = new Map();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-browserslist-config-ignore/output.mjs | JavaScript | import "core-js/modules/web.dom.iterable";
var a = new Map();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-evaluated-class-methods/input.mjs | JavaScript | var objectClass = Object;
var arrayInstance = [];
var assignStr = "assign";
var entriesStr = "entries";
var valuesStr = "values";
var includesStr = "includes";
var findStr = "find";
// Allow static methods be assigned to variables only directly in the module.
externalVar[valuesStr]; // don't include
objectClass[assign... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-evaluated-class-methods/output.mjs | JavaScript | import "core-js/modules/es6.object.assign";
import "core-js/modules/web.dom.iterable";
import "core-js/modules/es6.array.iterator";
import "core-js/modules/es6.object.to-string";
var objectClass = Object;
var arrayInstance = [];
var assignStr = "assign";
var entriesStr = "entries";
var valuesStr = "values";
var include... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-evaluated-instance-methods/input.mjs | JavaScript | var arrayInstance = [];
var includesStr = "includes";
var findStr = "find";
// Allow instance methods be assigned to variables.
arrayInstance[includesStr](); // include
externalVar[findStr]; // include
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-evaluated-instance-methods/output.mjs | JavaScript | import "core-js/modules/es6.array.find";
import "core-js/modules/es7.array.includes";
var arrayInstance = [];
var includesStr = "includes";
var findStr = "find"; // Allow instance methods be assigned to variables.
arrayInstance[includesStr](); // include
externalVar[findStr]; // include
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-evaluated-not-confident/input.mjs | JavaScript | Object["values"](); // include
[]["map"](); // include
Object[keys](); // don't include
[][filter](); // don't include
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-evaluated-not-confident/output.mjs | JavaScript | import "core-js/modules/es6.array.map";
import "core-js/modules/web.dom.iterable";
import "core-js/modules/es6.array.iterator";
import "core-js/modules/es6.object.to-string";
import "core-js/modules/es7.object.values";
Object['values'](); // include
[]['map'](); // include
Object[keys](); // don't include
[][filter]... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-instance-methods/input.mjs | JavaScript | Array.from; // static function
Map; // top level built-in
// instance methods may have false positives (which is ok)
a.includes(); // method call
b["find"]; // computed string?
c.prototype.findIndex(); // .prototype
d.fill.bind(); //.bind
e.padStart.apply(); // .apply
f.padEnd.call(); // .call
String.prototype.startsW... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-instance-methods/output.mjs | JavaScript | import "core-js/modules/es6.regexp.split";
import "core-js/modules/es6.regexp.replace";
import "core-js/modules/es6.regexp.search";
import "core-js/modules/es6.array.copy-within";
import "core-js/modules/es6.string.ends-with";
import "core-js/modules/es6.string.code-point-at";
import "core-js/modules/es6.string.starts-... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-modules-namespaced-orig/input.mjs | JavaScript | import * as ns from "ns";
ns.map;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-modules-namespaced-orig/output.mjs | JavaScript | import * as ns from "ns";
ns.map;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-modules-transform/input.mjs | JavaScript | Promise;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-modules-transform/output.js | JavaScript | "use strict";
require("core-js/modules/es6.promise");
require("core-js/modules/es6.object.to-string");
Promise;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-regenerator-used-async-and-promise-native-support/input.mjs | JavaScript | async function a() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-regenerator-used-async-and-promise-native-support/output.mjs | JavaScript | async function a() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-regenerator-used-async-native-support/input.mjs | JavaScript | async function a() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-regenerator-used-async-native-support/output.mjs | JavaScript | async function a() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-regenerator-used-async/input.mjs | JavaScript | async function a() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-regenerator-used-async/output.mjs | JavaScript | import "regenerator-runtime/runtime";
function a() {
return regeneratorRuntime.async(function a$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
case "end":
return _context.stop();
}
}
});
}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-regenerator-used-generator-native-support/input.mjs | JavaScript | function* a() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-regenerator-used-generator-native-support/output.mjs | JavaScript | function* a() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_ecma_preset_env/tests/fixtures/corejs2/.usage-regenerator-used-generator/input.mjs | JavaScript | function* a() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.