File tree Expand file tree Collapse file tree
ql/test/library-tests/TypeScript/Nullability Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ function handleOpenProjectCommand(command: OpenProjectCommand) {
253253 fileExists : ( path : string ) => fs . existsSync ( path ) ,
254254 readFile : ts . sys . readFile ,
255255 } ;
256- let config = ts . parseJsonConfigFileContent ( tsConfig , parseConfigHost , basePath ) ;
256+ let config = ts . parseJsonConfigFileContent ( tsConfig . config , parseConfigHost , basePath ) ;
257257 let project = new Project ( tsConfigFilename , config , state . typeTable ) ;
258258 project . load ( ) ;
259259
Original file line number Diff line number Diff line change 1+ exprType
2+ | tst.ts:1:5:1:16 | stringOrNUll | string \| null |
3+ | tst.ts:2:5:2:21 | stringOrUndefined | string \| undefined |
4+ | tst.ts:3:5:3:27 | stringO ... defined | string \| null \| undefined |
5+ | tst.ts:4:5:4:16 | stringOrVoid | string \| void |
6+ | tst.ts:7:5:7:21 | stringOrNullAlias | string \| null |
7+ | tst.ts:8:5:8:32 | stringO ... defined | string \| null \| undefined |
8+ | tst.ts:10:5:10:23 | arrayOfStringOrNull | (string \| null)[] |
9+ unaliasedType
Original file line number Diff line number Diff line change 1+ import javascript
2+
3+ query Type exprType ( Expr e ) { result = e .getType ( ) }
4+
5+ query Type unaliasedType ( TypeAliasReference ref ) { result = ref .getAliasedType ( ) }
Original file line number Diff line number Diff line change 1+ {
2+ "include" : [" ." ],
3+ "compilerOptions" : {
4+ "strict" : true
5+ }
6+ }
Original file line number Diff line number Diff line change 1+ let stringOrNUll : string | null ;
2+ let stringOrUndefined : string | undefined ;
3+ let stringOrNullOrUndefined : string | null | undefined ;
4+ let stringOrVoid : string | void ;
5+
6+ type StringOrNullAlias = string | null ;
7+ let stringOrNullAlias : StringOrNullAlias ;
8+ let stringOrNullAliasOrUndefined : StringOrNullAlias | undefined ;
9+
10+ let arrayOfStringOrNull : Array < string | null > ;
You can’t perform that action at this time.
0 commit comments