Skip to content

Commit daa4b1f

Browse files
committed
update LKG
2 parents 9c0e64d + 08eafd3 commit daa4b1f

File tree

8 files changed

+12430
-16452
lines changed

8 files changed

+12430
-16452
lines changed

lib/tsc.js

Lines changed: 1439 additions & 1501 deletions
Large diffs are not rendered by default.

lib/tsserver.js

Lines changed: 3536 additions & 5283 deletions
Large diffs are not rendered by default.

lib/tsserverlibrary.d.ts

Lines changed: 333 additions & 641 deletions
Large diffs are not rendered by default.

lib/tsserverlibrary.js

Lines changed: 3484 additions & 5101 deletions
Large diffs are not rendered by default.

lib/typescript.d.ts

Lines changed: 27 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ declare namespace ts {
2929
contains(fileName: Path): boolean;
3030
remove(fileName: Path): void;
3131
forEachValue(f: (key: Path, v: T) => void): void;
32-
getKeys(): Path[];
3332
clear(): void;
3433
}
3534
interface TextRange {
@@ -1246,7 +1245,7 @@ declare namespace ts {
12461245
* used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter
12471246
* will be invoked when writing the JavaScript and declaration files.
12481247
*/
1249-
emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean): EmitResult;
1248+
emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken): EmitResult;
12501249
getOptionsDiagnostics(cancellationToken?: CancellationToken): Diagnostic[];
12511250
getGlobalDiagnostics(cancellationToken?: CancellationToken): Diagnostic[];
12521251
getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
@@ -1373,7 +1372,6 @@ declare namespace ts {
13731372
UseFullyQualifiedType = 128,
13741373
InFirstTypeArgument = 256,
13751374
InTypeAlias = 512,
1376-
UseTypeAliasValue = 1024,
13771375
}
13781376
enum SymbolFormatFlags {
13791377
None = 0,
@@ -1744,7 +1742,6 @@ declare namespace ts {
17441742
raw?: any;
17451743
errors: Diagnostic[];
17461744
wildcardDirectories?: MapLike<WatchDirectoryFlags>;
1747-
compileOnSave?: boolean;
17481745
}
17491746
enum WatchDirectoryFlags {
17501747
None = 0,
@@ -1947,6 +1944,10 @@ declare namespace ts {
19471944
function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
19481945
}
19491946
declare namespace ts {
1947+
/** The version of the TypeScript compiler release */
1948+
const version = "2.1.0";
1949+
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string;
1950+
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
19501951
function getEffectiveTypeRoots(options: CompilerOptions, host: {
19511952
directoryExists?: (directoryName: string) => boolean;
19521953
getCurrentDirectory?: () => string;
@@ -1957,24 +1958,9 @@ declare namespace ts {
19571958
* is assumed to be the same as root directory of the project.
19581959
*/
19591960
function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string, options: CompilerOptions, host: ModuleResolutionHost): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
1960-
/**
1961-
* Given a set of options, returns the set of type directive names
1962-
* that should be included for this program automatically.
1963-
* This list could either come from the config file,
1964-
* or from enumerating the types root + initial secondary types lookup location.
1965-
* More type directives might appear in the program later as a result of loading actual source files;
1966-
* this list is only the set of defaults that are implicitly included.
1967-
*/
1968-
function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
19691961
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
19701962
function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
19711963
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
1972-
}
1973-
declare namespace ts {
1974-
/** The version of the TypeScript compiler release */
1975-
const version = "2.0.5";
1976-
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string;
1977-
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
19781964
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
19791965
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
19801966
interface FormatDiagnosticsHost {
@@ -1984,6 +1970,15 @@ declare namespace ts {
19841970
}
19851971
function formatDiagnostics(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
19861972
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
1973+
/**
1974+
* Given a set of options, returns the set of type directive names
1975+
* that should be included for this program automatically.
1976+
* This list could either come from the config file,
1977+
* or from enumerating the types root + initial secondary types lookup location.
1978+
* More type directives might appear in the program later as a result of loading actual source files;
1979+
* this list is only the set of defaults that are implicitly included.
1980+
*/
1981+
function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
19871982
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program;
19881983
}
19891984
declare namespace ts {
@@ -2000,7 +1995,7 @@ declare namespace ts {
20001995
* @param fileName The path to the config file
20011996
* @param jsonText The text of the config file
20021997
*/
2003-
function parseConfigFileTextToJson(fileName: string, jsonText: string, stripComments?: boolean): {
1998+
function parseConfigFileTextToJson(fileName: string, jsonText: string): {
20041999
config?: any;
20052000
error?: Diagnostic;
20062001
};
@@ -2012,13 +2007,12 @@ declare namespace ts {
20122007
* file to. e.g. outDir
20132008
*/
20142009
function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[]): ParsedCommandLine;
2015-
function convertCompileOnSaveOptionFromJson(jsonOption: any, basePath: string, errors: Diagnostic[]): boolean;
20162010
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
20172011
options: CompilerOptions;
20182012
errors: Diagnostic[];
20192013
};
20202014
function convertTypingOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
2021-
options: TypingOptions;
2015+
options: CompilerOptions;
20222016
errors: Diagnostic[];
20232017
};
20242018
}
@@ -2161,18 +2155,18 @@ declare namespace ts {
21612155
getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[];
21622156
/** @deprecated */
21632157
getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[];
2164-
getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[];
2158+
getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string): NavigateToItem[];
21652159
getNavigationBarItems(fileName: string): NavigationBarItem[];
21662160
getOutliningSpans(fileName: string): OutliningSpan[];
21672161
getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[];
21682162
getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[];
2169-
getIndentationAtPosition(fileName: string, position: number, options: EditorOptions | EditorSettings): number;
2170-
getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
2171-
getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
2172-
getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
2163+
getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number;
2164+
getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[];
2165+
getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[];
2166+
getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[];
21732167
getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion;
21742168
isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
2175-
getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput;
2169+
getEmitOutput(fileName: string): EmitOutput;
21762170
getProgram(): Program;
21772171
dispose(): void;
21782172
}
@@ -2252,11 +2246,6 @@ declare namespace ts {
22522246
containerName: string;
22532247
containerKind: string;
22542248
}
2255-
enum IndentStyle {
2256-
None = 0,
2257-
Block = 1,
2258-
Smart = 2,
2259-
}
22602249
interface EditorOptions {
22612250
BaseIndentSize?: number;
22622251
IndentSize: number;
@@ -2265,13 +2254,10 @@ declare namespace ts {
22652254
ConvertTabsToSpaces: boolean;
22662255
IndentStyle: IndentStyle;
22672256
}
2268-
interface EditorSettings {
2269-
baseIndentSize?: number;
2270-
indentSize: number;
2271-
tabSize: number;
2272-
newLineCharacter: string;
2273-
convertTabsToSpaces: boolean;
2274-
indentStyle: IndentStyle;
2257+
enum IndentStyle {
2258+
None = 0,
2259+
Block = 1,
2260+
Smart = 2,
22752261
}
22762262
interface FormatCodeOptions extends EditorOptions {
22772263
InsertSpaceAfterCommaDelimiter: boolean;
@@ -2287,21 +2273,7 @@ declare namespace ts {
22872273
InsertSpaceAfterTypeAssertion?: boolean;
22882274
PlaceOpenBraceOnNewLineForFunctions: boolean;
22892275
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
2290-
}
2291-
interface FormatCodeSettings extends EditorSettings {
2292-
insertSpaceAfterCommaDelimiter: boolean;
2293-
insertSpaceAfterSemicolonInForStatements: boolean;
2294-
insertSpaceBeforeAndAfterBinaryOperators: boolean;
2295-
insertSpaceAfterKeywordsInControlFlowStatements: boolean;
2296-
insertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
2297-
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
2298-
insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
2299-
insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
2300-
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
2301-
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: boolean;
2302-
insertSpaceAfterTypeAssertion?: boolean;
2303-
placeOpenBraceOnNewLineForFunctions: boolean;
2304-
placeOpenBraceOnNewLineForControlBlocks: boolean;
2276+
[s: string]: boolean | number | string | undefined;
23052277
}
23062278
interface DefinitionInfo {
23072279
fileName: string;
@@ -2715,7 +2687,6 @@ declare namespace ts {
27152687
interface DisplayPartsSymbolWriter extends SymbolWriter {
27162688
displayParts(): SymbolDisplayPart[];
27172689
}
2718-
function toEditorSettings(options: EditorOptions | EditorSettings): EditorSettings;
27192690
function displayPartsToString(displayParts: SymbolDisplayPart[]): string;
27202691
function getDefaultCompilerOptions(): CompilerOptions;
27212692
function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile;

0 commit comments

Comments
 (0)