Skip to content

Commit 32a9196

Browse files
committed
Merge branch 'mergerRelease-2.0InMaster'
2 parents 59c4d3f + ac72aff commit 32a9196

File tree

8 files changed

+938
-404
lines changed

8 files changed

+938
-404
lines changed

lib/tsc.js

Lines changed: 116 additions & 76 deletions
Large diffs are not rendered by default.

lib/tsserver.js

Lines changed: 188 additions & 75 deletions
Large diffs are not rendered by default.

lib/tsserverlibrary.d.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,10 @@ declare namespace ts {
405405
interface ModifiersArray extends NodeArray<Modifier> {
406406
flags: NodeFlags;
407407
}
408-
interface Modifier extends Node {
408+
interface Token extends Node {
409+
__tokenTag: any;
410+
}
411+
interface Modifier extends Token {
409412
}
410413
interface Identifier extends PrimaryExpression {
411414
text: string;
@@ -2050,7 +2053,6 @@ declare namespace ts {
20502053
getCancellationToken?(): CancellationToken;
20512054
getDefaultLibFileName(options: CompilerOptions): string;
20522055
getDefaultLibLocation?(): string;
2053-
getDefaultTypeDirectiveNames?(rootPath: string): string[];
20542056
writeFile: WriteFileCallback;
20552057
getCurrentDirectory(): string;
20562058
getDirectories(path: string): string[];
@@ -2156,6 +2158,8 @@ declare namespace ts {
21562158
function ensureTrailingDirectorySeparator(path: string): string;
21572159
function comparePaths(a: string, b: string, currentDirectory: string, ignoreCase?: boolean): Comparison;
21582160
function containsPath(parent: string, child: string, currentDirectory: string, ignoreCase?: boolean): boolean;
2161+
function startsWith(str: string, prefix: string): boolean;
2162+
function endsWith(str: string, suffix: string): boolean;
21592163
function fileExtensionIs(path: string, extension: string): boolean;
21602164
function fileExtensionIsAny(path: string, extensions: string[]): boolean;
21612165
function getRegularExpressionForWildcard(specs: string[], basePath: string, usage: "files" | "directories" | "exclude"): string;
@@ -2193,6 +2197,8 @@ declare namespace ts {
21932197
function changeExtension<T extends string | Path>(path: T, newExtension: string): T;
21942198
interface ObjectAllocator {
21952199
getNodeConstructor(): new (kind: SyntaxKind, pos?: number, end?: number) => Node;
2200+
getTokenConstructor(): new (kind: SyntaxKind, pos?: number, end?: number) => Token;
2201+
getIdentifierConstructor(): new (kind: SyntaxKind, pos?: number, end?: number) => Token;
21962202
getSourceFileConstructor(): new (kind: SyntaxKind, pos?: number, end?: number) => SourceFile;
21972203
getSymbolConstructor(): new (flags: SymbolFlags, name: string) => Symbol;
21982204
getTypeConstructor(): new (checker: TypeChecker, flags: TypeFlags) => Type;
@@ -6456,13 +6462,13 @@ declare namespace ts {
64566462
key: string;
64576463
message: string;
64586464
};
6459-
Report_Errors_on_Unused_Locals: {
6465+
Report_errors_on_unused_locals: {
64606466
code: number;
64616467
category: DiagnosticCategory;
64626468
key: string;
64636469
message: string;
64646470
};
6465-
Report_Errors_on_Unused_Parameters: {
6471+
Report_errors_on_unused_parameters: {
64666472
code: number;
64676473
category: DiagnosticCategory;
64686474
key: string;
@@ -7143,8 +7149,6 @@ declare namespace ts {
71437149
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
71447150
function getTypeParameterOwner(d: Declaration): Declaration;
71457151
function isParameterPropertyDeclaration(node: ParameterDeclaration): boolean;
7146-
function startsWith(str: string, prefix: string): boolean;
7147-
function endsWith(str: string, suffix: string): boolean;
71487152
}
71497153
declare namespace ts {
71507154
let parseTime: number;
@@ -7225,6 +7229,12 @@ declare namespace ts {
72257229
const defaultInitCompilerOptions: CompilerOptions;
72267230
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
72277231
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
7232+
interface FormatDiagnosticsHost {
7233+
getCurrentDirectory(): string;
7234+
getCanonicalFileName(fileName: string): string;
7235+
getNewLine(): string;
7236+
}
7237+
function formatDiagnostics(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
72287238
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
72297239
function getAutomaticTypeDirectiveNames(options: CompilerOptions, rootFiles: string[], host: CompilerHost): string[];
72307240
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program;

lib/tsserverlibrary.js

Lines changed: 188 additions & 75 deletions
Large diffs are not rendered by default.

lib/typescript.d.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,10 @@ declare namespace ts {
409409
interface ModifiersArray extends NodeArray<Modifier> {
410410
flags: NodeFlags;
411411
}
412-
interface Modifier extends Node {
412+
interface Token extends Node {
413+
__tokenTag: any;
414+
}
415+
interface Modifier extends Token {
413416
}
414417
interface Identifier extends PrimaryExpression {
415418
text: string;
@@ -1696,7 +1699,6 @@ declare namespace ts {
16961699
getCancellationToken?(): CancellationToken;
16971700
getDefaultLibFileName(options: CompilerOptions): string;
16981701
getDefaultLibLocation?(): string;
1699-
getDefaultTypeDirectiveNames?(rootPath: string): string[];
17001702
writeFile: WriteFileCallback;
17011703
getCurrentDirectory(): string;
17021704
getDirectories(path: string): string[];
@@ -1842,8 +1844,6 @@ declare namespace ts {
18421844
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
18431845
function getTypeParameterOwner(d: Declaration): Declaration;
18441846
function isParameterPropertyDeclaration(node: ParameterDeclaration): boolean;
1845-
function startsWith(str: string, prefix: string): boolean;
1846-
function endsWith(str: string, suffix: string): boolean;
18471847
}
18481848
declare namespace ts {
18491849
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
@@ -1868,6 +1868,12 @@ declare namespace ts {
18681868
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
18691869
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
18701870
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
1871+
interface FormatDiagnosticsHost {
1872+
getCurrentDirectory(): string;
1873+
getCanonicalFileName(fileName: string): string;
1874+
getNewLine(): string;
1875+
}
1876+
function formatDiagnostics(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
18711877
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
18721878
/**
18731879
* Given a set of options and a set of root files, returns the set of type directive names

0 commit comments

Comments
 (0)