Skip to content

Commit 51965b6

Browse files
Merge pull request #5502 from Microsoft/usePretty
Use '--pretty' in builds
2 parents 38b990b + 3f0c6b1 commit 51965b6

9 files changed

+4768
-3029
lines changed

Jakefile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ var builtLocalCompiler = path.join(builtLocalDirectory, compilerFilename);
228228
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, stripInternal, callback) {
229229
file(outFile, prereqs, function() {
230230
var compilerPath = useBuiltCompiler ? builtLocalCompiler : LKGCompiler;
231-
var options = "--module commonjs --noImplicitAny --noEmitOnError";
231+
var options = "--module commonjs --noImplicitAny --noEmitOnError --pretty";
232232

233233
// Keep comments when specifically requested
234234
// or when in debug mode.

lib/tsc.js

Lines changed: 1054 additions & 604 deletions
Large diffs are not rendered by default.

lib/tsserver.js

Lines changed: 1164 additions & 777 deletions
Large diffs are not rendered by default.

lib/typescript.d.ts

Lines changed: 57 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,22 @@ declare namespace ts {
1717
interface Map<T> {
1818
[index: string]: T;
1919
}
20+
type Path = string & {
21+
__pathBrand: any;
22+
};
2023
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;
2629
clear(): void;
2730
}
2831
interface TextRange {
2932
pos: number;
3033
end: number;
3134
}
32-
const enum SyntaxKind {
35+
enum SyntaxKind {
3336
Unknown = 0,
3437
EndOfFileToken = 1,
3538
SingleLineCommentTrivia = 2,
@@ -327,31 +330,34 @@ declare namespace ts {
327330
LastBinaryOperator = 68,
328331
FirstNode = 135,
329332
}
330-
const enum NodeFlags {
333+
enum NodeFlags {
331334
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 {
355361
None = 0,
356362
IntrinsicNamedElement = 1,
357363
IntrinsicIndexedElement = 2,
@@ -931,6 +937,7 @@ declare namespace ts {
931937
statements: NodeArray<Statement>;
932938
endOfFileToken: Node;
933939
fileName: string;
940+
path: Path;
934941
text: string;
935942
amdDependencies: {
936943
path: string;
@@ -1093,7 +1100,7 @@ declare namespace ts {
10931100
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
10941101
reportInaccessibleThisError(): void;
10951102
}
1096-
const enum TypeFormatFlags {
1103+
enum TypeFormatFlags {
10971104
None = 0,
10981105
WriteArrayAsGenericType = 1,
10991106
UseTypeOfFunction = 2,
@@ -1104,7 +1111,7 @@ declare namespace ts {
11041111
InElementType = 64,
11051112
UseFullyQualifiedType = 128,
11061113
}
1107-
const enum SymbolFormatFlags {
1114+
enum SymbolFormatFlags {
11081115
None = 0,
11091116
WriteTypeParametersOrArguments = 1,
11101117
UseOnlyExternalAliasing = 2,
@@ -1114,7 +1121,7 @@ declare namespace ts {
11141121
parameterIndex: number;
11151122
type: Type;
11161123
}
1117-
const enum SymbolFlags {
1124+
enum SymbolFlags {
11181125
None = 0,
11191126
FunctionScopedVariable = 1,
11201127
BlockScopedVariable = 2,
@@ -1191,7 +1198,7 @@ declare namespace ts {
11911198
interface SymbolTable {
11921199
[index: string]: Symbol;
11931200
}
1194-
const enum TypeFlags {
1201+
enum TypeFlags {
11951202
Any = 1,
11961203
String = 2,
11971204
Number = 4,
@@ -1262,7 +1269,7 @@ declare namespace ts {
12621269
interface TypeParameter extends Type {
12631270
constraint: Type;
12641271
}
1265-
const enum SignatureKind {
1272+
enum SignatureKind {
12661273
Call = 0,
12671274
Construct = 1,
12681275
}
@@ -1272,7 +1279,7 @@ declare namespace ts {
12721279
parameters: Symbol[];
12731280
typePredicate?: TypePredicate;
12741281
}
1275-
const enum IndexKind {
1282+
enum IndexKind {
12761283
String = 0,
12771284
Number = 1,
12781285
}
@@ -1307,7 +1314,7 @@ declare namespace ts {
13071314
Error = 1,
13081315
Message = 2,
13091316
}
1310-
const enum ModuleResolutionKind {
1317+
enum ModuleResolutionKind {
13111318
Classic = 1,
13121319
NodeJs = 2,
13131320
}
@@ -1352,10 +1359,14 @@ declare namespace ts {
13521359
experimentalDecorators?: boolean;
13531360
emitDecoratorMetadata?: boolean;
13541361
moduleResolution?: ModuleResolutionKind;
1362+
allowUnusedLabels?: boolean;
1363+
allowUnreachableCode?: boolean;
1364+
noImplicitReturns?: boolean;
1365+
noFallthroughCasesInSwitch?: boolean;
13551366
forceConsistentCasingInFileNames?: boolean;
13561367
[option: string]: string | number | boolean;
13571368
}
1358-
const enum ModuleKind {
1369+
enum ModuleKind {
13591370
None = 0,
13601371
CommonJS = 1,
13611372
AMD = 2,
@@ -1364,27 +1375,27 @@ declare namespace ts {
13641375
ES6 = 5,
13651376
ES2015 = 5,
13661377
}
1367-
const enum JsxEmit {
1378+
enum JsxEmit {
13681379
None = 0,
13691380
Preserve = 1,
13701381
React = 2,
13711382
}
1372-
const enum NewLineKind {
1383+
enum NewLineKind {
13731384
CarriageReturnLineFeed = 0,
13741385
LineFeed = 1,
13751386
}
13761387
interface LineAndCharacter {
13771388
line: number;
13781389
character: number;
13791390
}
1380-
const enum ScriptTarget {
1391+
enum ScriptTarget {
13811392
ES3 = 0,
13821393
ES5 = 1,
13831394
ES6 = 2,
13841395
ES2015 = 2,
13851396
Latest = 2,
13861397
}
1387-
const enum LanguageVariant {
1398+
enum LanguageVariant {
13881399
Standard = 0,
13891400
JSX = 1,
13901401
}
@@ -1938,7 +1949,7 @@ declare namespace ts {
19381949
outputFiles: OutputFile[];
19391950
emitSkipped: boolean;
19401951
}
1941-
const enum OutputFileType {
1952+
enum OutputFileType {
19421953
JavaScript = 0,
19431954
SourceMap = 1,
19441955
Declaration = 2,
@@ -1948,7 +1959,7 @@ declare namespace ts {
19481959
writeByteOrderMark: boolean;
19491960
text: string;
19501961
}
1951-
const enum EndOfLineState {
1962+
enum EndOfLineState {
19521963
None = 0,
19531964
InMultiLineCommentTrivia = 1,
19541965
InSingleQuoteStringLiteral = 2,
@@ -2116,7 +2127,7 @@ declare namespace ts {
21162127
static parameterName: string;
21172128
static docCommentTagName: string;
21182129
}
2119-
const enum ClassificationType {
2130+
enum ClassificationType {
21202131
comment = 1,
21212132
identifier = 2,
21222133
keyword = 3,
@@ -2159,7 +2170,7 @@ declare namespace ts {
21592170
let disableIncrementalParsing: boolean;
21602171
function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
21612172
function createGetCanonicalFileName(useCaseSensitivefileNames: boolean): (fileName: string) => string;
2162-
function createDocumentRegistry(useCaseSensitiveFileNames?: boolean): DocumentRegistry;
2173+
function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry;
21632174
function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo;
21642175
function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService;
21652176
function createClassifier(): Classifier;

0 commit comments

Comments
 (0)