mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
add test for moduleSuffixes
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"target": "esnext",
|
"target": "esnext",
|
||||||
"lib": ["dom", "esnext"],
|
"lib": ["dom", "esnext"],
|
||||||
"resolveJsonModule": true
|
"resolveJsonModule": true,
|
||||||
|
"moduleSuffixes": [".ios", ""]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -363,3 +363,13 @@ console.log(tstModuleCJS());
|
|||||||
|
|
||||||
/////////////////
|
/////////////////
|
||||||
|
|
||||||
|
// test file resolution order (see tsconfig: moduleSuffixes setting)
|
||||||
|
|
||||||
|
import * as A from './tstSuffixA';
|
||||||
|
|
||||||
|
console.log(A.resolvedFile()); // <- 'tstSuffixA.ts'
|
||||||
|
|
||||||
|
import * as B from './tstSuffixB';
|
||||||
|
|
||||||
|
console.log(B.resolvedFile()); // <- 'tstSuffixB.ios.ts'
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export function resolvedFile(): 'tstSuffixA.ts' {
|
||||||
|
return 'tstSuffixA.ts';
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export function resolvedFile(): 'tstSuffixB.ios.ts' {
|
||||||
|
return 'tstSuffixB.ios.ts';
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export function resolvedFile(): 'tstSuffixB.ts' {
|
||||||
|
return 'tstSuffixB.ts';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user