Adopt TypeScript@3.3

pull/2748/head
Alex Dima 6 years ago
parent 0f97f5fd54
commit c0f4050960

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -14,7 +14,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
declare namespace ts { declare namespace ts {
const versionMajorMinor = "3.2"; const versionMajorMinor = "3.3";
/** The version of the TypeScript compiler release */ /** The version of the TypeScript compiler release */
const version: string; const version: string;
} }
@ -1726,15 +1726,18 @@ declare namespace ts {
} }
interface InputFiles extends Node { interface InputFiles extends Node {
kind: SyntaxKind.InputFiles; kind: SyntaxKind.InputFiles;
javascriptPath?: string;
javascriptText: string; javascriptText: string;
javascriptMapPath?: string; javascriptMapPath?: string;
javascriptMapText?: string; javascriptMapText?: string;
declarationPath?: string;
declarationText: string; declarationText: string;
declarationMapPath?: string; declarationMapPath?: string;
declarationMapText?: string; declarationMapText?: string;
} }
interface UnparsedSource extends Node { interface UnparsedSource extends Node {
kind: SyntaxKind.UnparsedSource; kind: SyntaxKind.UnparsedSource;
fileName?: string;
text: string; text: string;
sourceMapPath?: string; sourceMapPath?: string;
sourceMapText?: string; sourceMapText?: string;
@ -1778,7 +1781,7 @@ declare namespace ts {
type ResolvedConfigFileName = string & { type ResolvedConfigFileName = string & {
_isResolvedConfigFileName: never; _isResolvedConfigFileName: never;
}; };
type WriteFileCallback = (fileName: string, data: string, writeByteOrderMark: boolean, onError: ((message: string) => void) | undefined, sourceFiles?: ReadonlyArray<SourceFile>) => void; type WriteFileCallback = (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: ReadonlyArray<SourceFile>) => void;
class OperationCanceledException { class OperationCanceledException {
} }
interface CancellationToken { interface CancellationToken {
@ -2214,6 +2217,7 @@ declare namespace ts {
} }
interface UniqueESSymbolType extends Type { interface UniqueESSymbolType extends Type {
symbol: Symbol; symbol: Symbol;
escapedName: __String;
} }
interface StringLiteralType extends LiteralType { interface StringLiteralType extends LiteralType {
value: string; value: string;
@ -2689,7 +2693,6 @@ declare namespace ts {
getDefaultLibLocation?(): string; getDefaultLibLocation?(): string;
writeFile: WriteFileCallback; writeFile: WriteFileCallback;
getCurrentDirectory(): string; getCurrentDirectory(): string;
getDirectories(path: string): string[];
getCanonicalFileName(fileName: string): string; getCanonicalFileName(fileName: string): string;
useCaseSensitiveFileNames(): boolean; useCaseSensitiveFileNames(): boolean;
getNewLine(): string; getNewLine(): string;
@ -3006,13 +3009,14 @@ declare namespace ts {
} }
interface UserPreferences { interface UserPreferences {
readonly disableSuggestions?: boolean; readonly disableSuggestions?: boolean;
readonly quotePreference?: "double" | "single"; readonly quotePreference?: "auto" | "double" | "single";
readonly includeCompletionsForModuleExports?: boolean; readonly includeCompletionsForModuleExports?: boolean;
readonly includeCompletionsWithInsertText?: boolean; readonly includeCompletionsWithInsertText?: boolean;
readonly importModuleSpecifierPreference?: "relative" | "non-relative"; readonly importModuleSpecifierPreference?: "relative" | "non-relative";
/** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
readonly importModuleSpecifierEnding?: "minimal" | "index" | "js"; readonly importModuleSpecifierEnding?: "minimal" | "index" | "js";
readonly allowTextChangesInNewFiles?: boolean; readonly allowTextChangesInNewFiles?: boolean;
readonly providePrefixAndSuffixTextForRename?: boolean;
} }
/** Represents a bigint literal value without requiring bigint support */ /** Represents a bigint literal value without requiring bigint support */
interface PseudoBigInt { interface PseudoBigInt {
@ -3097,6 +3101,7 @@ declare namespace ts {
scanJsxIdentifier(): SyntaxKind; scanJsxIdentifier(): SyntaxKind;
scanJsxAttributeValue(): SyntaxKind; scanJsxAttributeValue(): SyntaxKind;
reScanJsxToken(): JsxTokenSyntaxKind; reScanJsxToken(): JsxTokenSyntaxKind;
reScanLessThanToken(): SyntaxKind;
scanJsxToken(): JsxTokenSyntaxKind; scanJsxToken(): JsxTokenSyntaxKind;
scanJSDocToken(): JsDocSyntaxKind; scanJSDocToken(): JsDocSyntaxKind;
scan(): SyntaxKind; scan(): SyntaxKind;
@ -3978,9 +3983,11 @@ declare namespace ts {
function updateCommaList(node: CommaListExpression, elements: ReadonlyArray<Expression>): CommaListExpression; function updateCommaList(node: CommaListExpression, elements: ReadonlyArray<Expression>): CommaListExpression;
function createBundle(sourceFiles: ReadonlyArray<SourceFile>, prepends?: ReadonlyArray<UnparsedSource | InputFiles>): Bundle; function createBundle(sourceFiles: ReadonlyArray<SourceFile>, prepends?: ReadonlyArray<UnparsedSource | InputFiles>): Bundle;
function createUnparsedSourceFile(text: string): UnparsedSource; function createUnparsedSourceFile(text: string): UnparsedSource;
function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts"): UnparsedSource;
function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource; function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;
function createInputFiles(javascript: string, declaration: string): InputFiles; function createInputFiles(javascriptText: string, declarationText: string): InputFiles;
function createInputFiles(javascript: string, declaration: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles; function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined): InputFiles;
function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles;
function updateBundle(node: Bundle, sourceFiles: ReadonlyArray<SourceFile>, prepends?: ReadonlyArray<UnparsedSource>): Bundle; function updateBundle(node: Bundle, sourceFiles: ReadonlyArray<SourceFile>, prepends?: ReadonlyArray<UnparsedSource>): Bundle;
function createImmediatelyInvokedFunctionExpression(statements: ReadonlyArray<Statement>): CallExpression; function createImmediatelyInvokedFunctionExpression(statements: ReadonlyArray<Statement>): CallExpression;
function createImmediatelyInvokedFunctionExpression(statements: ReadonlyArray<Statement>, param: ParameterDeclaration, paramValue: Expression): CallExpression; function createImmediatelyInvokedFunctionExpression(statements: ReadonlyArray<Statement>, param: ParameterDeclaration, paramValue: Expression): CallExpression;
@ -4278,6 +4285,10 @@ declare namespace ts {
* Get the syntax diagnostics, for all source files if source file is not supplied * Get the syntax diagnostics, for all source files if source file is not supplied
*/ */
getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): ReadonlyArray<Diagnostic>; getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): ReadonlyArray<Diagnostic>;
/**
* Get the declaration diagnostics, for all source files if source file is not supplied
*/
getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): ReadonlyArray<DiagnosticWithLocation>;
/** /**
* Get all the dependencies of the file * Get all the dependencies of the file
*/ */
@ -4364,13 +4375,11 @@ declare namespace ts {
/** If provided, will be used to reset existing delayed compilation */ /** If provided, will be used to reset existing delayed compilation */
clearTimeout?(timeoutId: any): void; clearTimeout?(timeoutId: any): void;
} }
interface WatchCompilerHost<T extends BuilderProgram> extends WatchHost { interface ProgramHost<T extends BuilderProgram> {
/** /**
* Used to create the program when need for program creation or recreation detected * Used to create the program when need for program creation or recreation detected
*/ */
createProgram: CreateProgram<T>; createProgram: CreateProgram<T>;
/** If provided, callback to invoke after every new program creation */
afterProgramCreate?(program: T): void;
useCaseSensitiveFileNames(): boolean; useCaseSensitiveFileNames(): boolean;
getNewLine(): string; getNewLine(): string;
getCurrentDirectory(): string; getCurrentDirectory(): string;
@ -4404,6 +4413,10 @@ declare namespace ts {
/** If provided, used to resolve type reference directives, otherwise typescript's default resolution */ /** If provided, used to resolve type reference directives, otherwise typescript's default resolution */
resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference?: ResolvedProjectReference): (ResolvedTypeReferenceDirective | undefined)[]; resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference?: ResolvedProjectReference): (ResolvedTypeReferenceDirective | undefined)[];
} }
interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost {
/** If provided, callback to invoke after every new program creation */
afterProgramCreate?(program: T): void;
}
/** /**
* Host to create watch with root files and options * Host to create watch with root files and options
*/ */
@ -4706,8 +4719,8 @@ declare namespace ts {
getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined; getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined;
getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan | undefined; getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan | undefined;
getSignatureHelpItems(fileName: string, position: number, options: SignatureHelpItemsOptions | undefined): SignatureHelpItems | undefined; getSignatureHelpItems(fileName: string, position: number, options: SignatureHelpItemsOptions | undefined): SignatureHelpItems | undefined;
getRenameInfo(fileName: string, position: number): RenameInfo; getRenameInfo(fileName: string, position: number, options?: RenameInfoOptions): RenameInfo;
findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): ReadonlyArray<RenameLocation> | undefined; findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): ReadonlyArray<RenameLocation> | undefined;
getDefinitionAtPosition(fileName: string, position: number): ReadonlyArray<DefinitionInfo> | undefined; getDefinitionAtPosition(fileName: string, position: number): ReadonlyArray<DefinitionInfo> | undefined;
getDefinitionAndBoundSpan(fileName: string, position: number): DefinitionInfoAndBoundSpan | undefined; getDefinitionAndBoundSpan(fileName: string, position: number): DefinitionInfoAndBoundSpan | undefined;
getTypeDefinitionAtPosition(fileName: string, position: number): ReadonlyArray<DefinitionInfo> | undefined; getTypeDefinitionAtPosition(fileName: string, position: number): ReadonlyArray<DefinitionInfo> | undefined;
@ -5150,6 +5163,9 @@ declare namespace ts {
canRename: false; canRename: false;
localizedErrorMessage: string; localizedErrorMessage: string;
} }
interface RenameInfoOptions {
readonly allowRenameOfImportPath?: boolean;
}
interface SignatureHelpParameter { interface SignatureHelpParameter {
name: string; name: string;
documentation: SymbolDisplayPart[]; documentation: SymbolDisplayPart[];

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save