mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
20 lines
455 B
TypeScript
20 lines
455 B
TypeScript
// @module: es2020
|
|
// @target: es2020
|
|
// @filename: 0.ts
|
|
export class B {
|
|
print() { return "I am B"}
|
|
}
|
|
|
|
export function foo() { return "foo" }
|
|
|
|
// @filename: 1.ts
|
|
export function backup() { return "backup"; }
|
|
|
|
// @filename: 2.ts
|
|
declare function bar(): boolean;
|
|
const specify = bar() ? "./0" : undefined;
|
|
let myModule = import(specify);
|
|
let myModule1 = import(undefined);
|
|
let myModule2 = import(bar() ? "./1" : null);
|
|
let myModule3 = import(null);
|