=== tests/cases/conformance/dynamicImport/defaultPath.ts === export class C {} >C : C === tests/cases/conformance/dynamicImport/1.ts === import * as defaultModule from "./defaultPath"; >defaultModule : typeof defaultModule declare function getSpecifier(): string; >getSpecifier : () => string declare function ValidSomeCondition(): boolean; >ValidSomeCondition : () => boolean declare var whatToLoad: boolean; >whatToLoad : boolean declare const directory: string; >directory : string declare const moduleFile: number; >moduleFile : number import(`${directory}\\${moduleFile}`); >import(`${directory}\\${moduleFile}`) : Promise >`${directory}\\${moduleFile}` : string >directory : string >moduleFile : number import(getSpecifier()); >import(getSpecifier()) : Promise >getSpecifier() : string >getSpecifier : () => string var p1 = import(ValidSomeCondition() ? "./0" : "externalModule"); >p1 : Promise >import(ValidSomeCondition() ? "./0" : "externalModule") : Promise >ValidSomeCondition() ? "./0" : "externalModule" : "./0" | "externalModule" >ValidSomeCondition() : boolean >ValidSomeCondition : () => boolean >"./0" : "./0" >"externalModule" : "externalModule" var p1: Promise = import(getSpecifier()); >p1 : Promise >import(getSpecifier()) : Promise >getSpecifier() : string >getSpecifier : () => string var p11: Promise = import(getSpecifier()); >p11 : Promise >defaultModule : typeof defaultModule >import(getSpecifier()) : Promise >getSpecifier() : string >getSpecifier : () => string const p2 = import(whatToLoad ? getSpecifier() : "defaulPath") as Promise; >p2 : Promise >import(whatToLoad ? getSpecifier() : "defaulPath") as Promise : Promise >import(whatToLoad ? getSpecifier() : "defaulPath") : Promise >whatToLoad ? getSpecifier() : "defaulPath" : string >whatToLoad : boolean >getSpecifier() : string >getSpecifier : () => string >"defaulPath" : "defaulPath" >defaultModule : typeof defaultModule p1.then(zero => { >p1.then(zero => { return zero.foo(); // ok, zero is any}) : Promise >p1.then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >p1 : Promise >then : (onfulfilled?: (value: any) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise >zero => { return zero.foo(); // ok, zero is any} : (zero: any) => any >zero : any return zero.foo(); // ok, zero is any >zero.foo() : any >zero.foo : any >zero : any >foo : any }); let j: string; >j : string var p3: Promise = import(j=getSpecifier()); >p3 : Promise >defaultModule : typeof defaultModule >import(j=getSpecifier()) : Promise >j=getSpecifier() : string >j : string >getSpecifier() : string >getSpecifier : () => string function * loadModule(directories: string[]) { >loadModule : (directories: string[]) => Generator >directories : string[] for (const directory of directories) { >directory : string >directories : string[] const path = `${directory}\\moduleFile`; >path : string >`${directory}\\moduleFile` : string >directory : string import(yield path); >import(yield path) : Promise >yield path : any >path : string } }