@@ -17,19 +17,22 @@ declare namespace ts {
17
17
interface Map < T > {
18
18
[ index : string ] : T ;
19
19
}
20
+ type Path = string & {
21
+ __pathBrand : any ;
22
+ } ;
20
23
interface FileMap < T > {
21
- get ( fileName : string ) : T ;
22
- set ( fileName : string , value : T ) : void ;
23
- contains ( fileName : string ) : boolean ;
24
- remove ( fileName : string ) : void ;
25
- forEachValue ( f : ( v : T ) => void ) : void ;
24
+ get ( fileName : Path ) : T ;
25
+ set ( fileName : Path , value : T ) : void ;
26
+ contains ( fileName : Path ) : boolean ;
27
+ remove ( fileName : Path ) : void ;
28
+ forEachValue ( f : ( key : Path , v : T ) => void ) : void ;
26
29
clear ( ) : void ;
27
30
}
28
31
interface TextRange {
29
32
pos : number ;
30
33
end : number ;
31
34
}
32
- const enum SyntaxKind {
35
+ enum SyntaxKind {
33
36
Unknown = 0 ,
34
37
EndOfFileToken = 1 ,
35
38
SingleLineCommentTrivia = 2 ,
@@ -327,31 +330,34 @@ declare namespace ts {
327
330
LastBinaryOperator = 68 ,
328
331
FirstNode = 135 ,
329
332
}
330
- const enum NodeFlags {
333
+ enum NodeFlags {
331
334
None = 0 ,
332
- Export = 1 ,
333
- Ambient = 2 ,
334
- Public = 16 ,
335
- Private = 32 ,
336
- Protected = 64 ,
337
- Static = 128 ,
338
- Abstract = 256 ,
339
- Async = 512 ,
340
- Default = 1024 ,
341
- MultiLine = 2048 ,
342
- Synthetic = 4096 ,
343
- DeclarationFile = 8192 ,
344
- Let = 16384 ,
345
- Const = 32768 ,
346
- OctalLiteral = 65536 ,
347
- Namespace = 131072 ,
348
- ExportContext = 262144 ,
349
- ContainsThis = 524288 ,
350
- Modifier = 2035 ,
351
- AccessibilityModifier = 112 ,
352
- BlockScoped = 49152 ,
353
- }
354
- const enum JsxFlags {
335
+ Export = 2 ,
336
+ Ambient = 4 ,
337
+ Public = 8 ,
338
+ Private = 16 ,
339
+ Protected = 32 ,
340
+ Static = 64 ,
341
+ Abstract = 128 ,
342
+ Async = 256 ,
343
+ Default = 512 ,
344
+ MultiLine = 1024 ,
345
+ Synthetic = 2048 ,
346
+ DeclarationFile = 4096 ,
347
+ Let = 8192 ,
348
+ Const = 16384 ,
349
+ OctalLiteral = 32768 ,
350
+ Namespace = 65536 ,
351
+ ExportContext = 131072 ,
352
+ ContainsThis = 262144 ,
353
+ HasImplicitReturn = 524288 ,
354
+ HasExplicitReturn = 1048576 ,
355
+ Modifier = 1022 ,
356
+ AccessibilityModifier = 56 ,
357
+ BlockScoped = 24576 ,
358
+ ReachabilityCheckFlags = 1572864 ,
359
+ }
360
+ enum JsxFlags {
355
361
None = 0 ,
356
362
IntrinsicNamedElement = 1 ,
357
363
IntrinsicIndexedElement = 2 ,
@@ -931,6 +937,7 @@ declare namespace ts {
931
937
statements : NodeArray < Statement > ;
932
938
endOfFileToken : Node ;
933
939
fileName : string ;
940
+ path : Path ;
934
941
text : string ;
935
942
amdDependencies : {
936
943
path : string ;
@@ -1093,7 +1100,7 @@ declare namespace ts {
1093
1100
trackSymbol ( symbol : Symbol , enclosingDeclaration ?: Node , meaning ?: SymbolFlags ) : void ;
1094
1101
reportInaccessibleThisError ( ) : void ;
1095
1102
}
1096
- const enum TypeFormatFlags {
1103
+ enum TypeFormatFlags {
1097
1104
None = 0 ,
1098
1105
WriteArrayAsGenericType = 1 ,
1099
1106
UseTypeOfFunction = 2 ,
@@ -1104,7 +1111,7 @@ declare namespace ts {
1104
1111
InElementType = 64 ,
1105
1112
UseFullyQualifiedType = 128 ,
1106
1113
}
1107
- const enum SymbolFormatFlags {
1114
+ enum SymbolFormatFlags {
1108
1115
None = 0 ,
1109
1116
WriteTypeParametersOrArguments = 1 ,
1110
1117
UseOnlyExternalAliasing = 2 ,
@@ -1114,7 +1121,7 @@ declare namespace ts {
1114
1121
parameterIndex : number ;
1115
1122
type : Type ;
1116
1123
}
1117
- const enum SymbolFlags {
1124
+ enum SymbolFlags {
1118
1125
None = 0 ,
1119
1126
FunctionScopedVariable = 1 ,
1120
1127
BlockScopedVariable = 2 ,
@@ -1191,7 +1198,7 @@ declare namespace ts {
1191
1198
interface SymbolTable {
1192
1199
[ index : string ] : Symbol ;
1193
1200
}
1194
- const enum TypeFlags {
1201
+ enum TypeFlags {
1195
1202
Any = 1 ,
1196
1203
String = 2 ,
1197
1204
Number = 4 ,
@@ -1262,7 +1269,7 @@ declare namespace ts {
1262
1269
interface TypeParameter extends Type {
1263
1270
constraint : Type ;
1264
1271
}
1265
- const enum SignatureKind {
1272
+ enum SignatureKind {
1266
1273
Call = 0 ,
1267
1274
Construct = 1 ,
1268
1275
}
@@ -1272,7 +1279,7 @@ declare namespace ts {
1272
1279
parameters : Symbol [ ] ;
1273
1280
typePredicate ?: TypePredicate ;
1274
1281
}
1275
- const enum IndexKind {
1282
+ enum IndexKind {
1276
1283
String = 0 ,
1277
1284
Number = 1 ,
1278
1285
}
@@ -1307,7 +1314,7 @@ declare namespace ts {
1307
1314
Error = 1 ,
1308
1315
Message = 2 ,
1309
1316
}
1310
- const enum ModuleResolutionKind {
1317
+ enum ModuleResolutionKind {
1311
1318
Classic = 1 ,
1312
1319
NodeJs = 2 ,
1313
1320
}
@@ -1352,10 +1359,14 @@ declare namespace ts {
1352
1359
experimentalDecorators ?: boolean ;
1353
1360
emitDecoratorMetadata ?: boolean ;
1354
1361
moduleResolution ?: ModuleResolutionKind ;
1362
+ allowUnusedLabels ?: boolean ;
1363
+ allowUnreachableCode ?: boolean ;
1364
+ noImplicitReturns ?: boolean ;
1365
+ noFallthroughCasesInSwitch ?: boolean ;
1355
1366
forceConsistentCasingInFileNames ?: boolean ;
1356
1367
[ option : string ] : string | number | boolean ;
1357
1368
}
1358
- const enum ModuleKind {
1369
+ enum ModuleKind {
1359
1370
None = 0 ,
1360
1371
CommonJS = 1 ,
1361
1372
AMD = 2 ,
@@ -1364,27 +1375,27 @@ declare namespace ts {
1364
1375
ES6 = 5 ,
1365
1376
ES2015 = 5 ,
1366
1377
}
1367
- const enum JsxEmit {
1378
+ enum JsxEmit {
1368
1379
None = 0 ,
1369
1380
Preserve = 1 ,
1370
1381
React = 2 ,
1371
1382
}
1372
- const enum NewLineKind {
1383
+ enum NewLineKind {
1373
1384
CarriageReturnLineFeed = 0 ,
1374
1385
LineFeed = 1 ,
1375
1386
}
1376
1387
interface LineAndCharacter {
1377
1388
line : number ;
1378
1389
character : number ;
1379
1390
}
1380
- const enum ScriptTarget {
1391
+ enum ScriptTarget {
1381
1392
ES3 = 0 ,
1382
1393
ES5 = 1 ,
1383
1394
ES6 = 2 ,
1384
1395
ES2015 = 2 ,
1385
1396
Latest = 2 ,
1386
1397
}
1387
- const enum LanguageVariant {
1398
+ enum LanguageVariant {
1388
1399
Standard = 0 ,
1389
1400
JSX = 1 ,
1390
1401
}
@@ -1938,7 +1949,7 @@ declare namespace ts {
1938
1949
outputFiles : OutputFile [ ] ;
1939
1950
emitSkipped : boolean ;
1940
1951
}
1941
- const enum OutputFileType {
1952
+ enum OutputFileType {
1942
1953
JavaScript = 0 ,
1943
1954
SourceMap = 1 ,
1944
1955
Declaration = 2 ,
@@ -1948,7 +1959,7 @@ declare namespace ts {
1948
1959
writeByteOrderMark : boolean ;
1949
1960
text : string ;
1950
1961
}
1951
- const enum EndOfLineState {
1962
+ enum EndOfLineState {
1952
1963
None = 0 ,
1953
1964
InMultiLineCommentTrivia = 1 ,
1954
1965
InSingleQuoteStringLiteral = 2 ,
@@ -2116,7 +2127,7 @@ declare namespace ts {
2116
2127
static parameterName : string ;
2117
2128
static docCommentTagName : string ;
2118
2129
}
2119
- const enum ClassificationType {
2130
+ enum ClassificationType {
2120
2131
comment = 1 ,
2121
2132
identifier = 2 ,
2122
2133
keyword = 3 ,
@@ -2159,7 +2170,7 @@ declare namespace ts {
2159
2170
let disableIncrementalParsing : boolean ;
2160
2171
function updateLanguageServiceSourceFile ( sourceFile : SourceFile , scriptSnapshot : IScriptSnapshot , version : string , textChangeRange : TextChangeRange , aggressiveChecks ?: boolean ) : SourceFile ;
2161
2172
function createGetCanonicalFileName ( useCaseSensitivefileNames : boolean ) : ( fileName : string ) => string ;
2162
- function createDocumentRegistry ( useCaseSensitiveFileNames ?: boolean ) : DocumentRegistry ;
2173
+ function createDocumentRegistry ( useCaseSensitiveFileNames ?: boolean , currentDirectory ?: string ) : DocumentRegistry ;
2163
2174
function preProcessFile ( sourceText : string , readImportFiles ?: boolean ) : PreProcessedFileInfo ;
2164
2175
function createLanguageService ( host : LanguageServiceHost , documentRegistry ?: DocumentRegistry ) : LanguageService ;
2165
2176
function createClassifier ( ) : Classifier ;
0 commit comments