Update LKG

This commit is contained in:
Mohamed Hegazy
2017-06-06 10:09:47 -07:00
parent a6e1cedfd7
commit deaa1ec1bf
21 changed files with 43302 additions and 45701 deletions
-2
View File
@@ -69,5 +69,3 @@ function createCancellationToken(args) {
}
}
module.exports = createCancellationToken;
//# sourceMappingURL=cancellationToken.js.map
+4344 -4802
View File
File diff suppressed because it is too large Load Diff
+4198 -4451
View File
File diff suppressed because it is too large Load Diff
+4198 -6275
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -22,4 +22,4 @@ and limitations under the License.
/// <reference path="lib.es2017.object.d.ts" />
/// <reference path="lib.es2017.sharedmemory.d.ts" />
/// <reference path="lib.es2017.string.d.ts" />
/// <reference path="lib.es2017.intl.d.ts" />
/// <reference path="lib.es2017.intl.d.ts" />
+4198 -6274
View File
File diff suppressed because it is too large Load Diff
+30
View File
@@ -0,0 +1,30 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
type DateTimeFormatPartTypes = "day" | "dayPeriod" | "era" | "hour" | "literal" | "minute" | "month" | "second" | "timeZoneName" | "weekday" | "year";
interface DateTimeFormatPart {
type: DateTimeFormatPartTypes;
value: string;
}
interface DateTimeFormat {
formatToParts(date?: Date | number): DateTimeFormatPart[];
}
+146 -351
View File
File diff suppressed because it is too large Load Diff
+4344 -4802
View File
File diff suppressed because it is too large Load Diff
+4198 -6275
View File
File diff suppressed because it is too large Load Diff
+145 -134
View File
@@ -20,7 +20,7 @@ and limitations under the License.
/////////////////////////////
/// IE Worker APIs
/// Worker APIs
/////////////////////////////
interface Algorithm {
@@ -28,16 +28,16 @@ interface Algorithm {
}
interface CacheQueryOptions {
ignoreSearch?: boolean;
ignoreMethod?: boolean;
ignoreVary?: boolean;
cacheName?: string;
ignoreMethod?: boolean;
ignoreSearch?: boolean;
ignoreVary?: boolean;
}
interface CloseEventInit extends EventInit {
wasClean?: boolean;
code?: number;
reason?: string;
wasClean?: boolean;
}
interface EventInit {
@@ -69,16 +69,16 @@ interface MessageEventInit extends EventInit {
channel?: string;
data?: any;
origin?: string;
source?: any;
ports?: MessagePort[];
source?: any;
}
interface NotificationOptions {
dir?: NotificationDirection;
lang?: string;
body?: string;
tag?: string;
dir?: NotificationDirection;
icon?: string;
lang?: string;
tag?: string;
}
interface ObjectURLOptions {
@@ -86,29 +86,29 @@ interface ObjectURLOptions {
}
interface PushSubscriptionOptionsInit {
userVisibleOnly?: boolean;
applicationServerKey?: any;
userVisibleOnly?: boolean;
}
interface RequestInit {
method?: string;
headers?: any;
body?: any;
referrer?: string;
referrerPolicy?: ReferrerPolicy;
mode?: RequestMode;
credentials?: RequestCredentials;
cache?: RequestCache;
redirect?: RequestRedirect;
credentials?: RequestCredentials;
headers?: any;
integrity?: string;
keepalive?: boolean;
method?: string;
mode?: RequestMode;
redirect?: RequestRedirect;
referrer?: string;
referrerPolicy?: ReferrerPolicy;
window?: any;
}
interface ResponseInit {
headers?: any;
status?: number;
statusText?: string;
headers?: any;
}
interface ClientQueryOptions {
@@ -176,7 +176,7 @@ interface AudioBuffer {
declare var AudioBuffer: {
prototype: AudioBuffer;
new(): AudioBuffer;
}
};
interface Blob {
readonly size: number;
@@ -189,7 +189,7 @@ interface Blob {
declare var Blob: {
prototype: Blob;
new (blobParts?: any[], options?: BlobPropertyBag): Blob;
}
};
interface Cache {
add(request: RequestInfo): Promise<void>;
@@ -204,7 +204,7 @@ interface Cache {
declare var Cache: {
prototype: Cache;
new(): Cache;
}
};
interface CacheStorage {
delete(cacheName: string): Promise<boolean>;
@@ -217,7 +217,7 @@ interface CacheStorage {
declare var CacheStorage: {
prototype: CacheStorage;
new(): CacheStorage;
}
};
interface CloseEvent extends Event {
readonly code: number;
@@ -229,7 +229,7 @@ interface CloseEvent extends Event {
declare var CloseEvent: {
prototype: CloseEvent;
new(typeArg: string, eventInitDict?: CloseEventInit): CloseEvent;
}
};
interface Console {
assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
@@ -240,8 +240,8 @@ interface Console {
dirxml(value: any): void;
error(message?: any, ...optionalParams: any[]): void;
exception(message?: string, ...optionalParams: any[]): void;
group(groupTitle?: string): void;
groupCollapsed(groupTitle?: string): void;
group(groupTitle?: string, ...optionalParams: any[]): void;
groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void;
groupEnd(): void;
info(message?: any, ...optionalParams: any[]): void;
log(message?: any, ...optionalParams: any[]): void;
@@ -259,7 +259,7 @@ interface Console {
declare var Console: {
prototype: Console;
new(): Console;
}
};
interface Coordinates {
readonly accuracy: number;
@@ -274,7 +274,7 @@ interface Coordinates {
declare var Coordinates: {
prototype: Coordinates;
new(): Coordinates;
}
};
interface CryptoKey {
readonly algorithm: KeyAlgorithm;
@@ -286,7 +286,7 @@ interface CryptoKey {
declare var CryptoKey: {
prototype: CryptoKey;
new(): CryptoKey;
}
};
interface DOMError {
readonly name: string;
@@ -296,7 +296,7 @@ interface DOMError {
declare var DOMError: {
prototype: DOMError;
new(): DOMError;
}
};
interface DOMException {
readonly code: number;
@@ -316,10 +316,10 @@ interface DOMException {
readonly INVALID_STATE_ERR: number;
readonly NAMESPACE_ERR: number;
readonly NETWORK_ERR: number;
readonly NOT_FOUND_ERR: number;
readonly NOT_SUPPORTED_ERR: number;
readonly NO_DATA_ALLOWED_ERR: number;
readonly NO_MODIFICATION_ALLOWED_ERR: number;
readonly NOT_FOUND_ERR: number;
readonly NOT_SUPPORTED_ERR: number;
readonly PARSE_ERR: number;
readonly QUOTA_EXCEEDED_ERR: number;
readonly SECURITY_ERR: number;
@@ -348,10 +348,10 @@ declare var DOMException: {
readonly INVALID_STATE_ERR: number;
readonly NAMESPACE_ERR: number;
readonly NETWORK_ERR: number;
readonly NOT_FOUND_ERR: number;
readonly NOT_SUPPORTED_ERR: number;
readonly NO_DATA_ALLOWED_ERR: number;
readonly NO_MODIFICATION_ALLOWED_ERR: number;
readonly NOT_FOUND_ERR: number;
readonly NOT_SUPPORTED_ERR: number;
readonly PARSE_ERR: number;
readonly QUOTA_EXCEEDED_ERR: number;
readonly SECURITY_ERR: number;
@@ -362,7 +362,7 @@ declare var DOMException: {
readonly URL_MISMATCH_ERR: number;
readonly VALIDATION_ERR: number;
readonly WRONG_DOCUMENT_ERR: number;
}
};
interface DOMStringList {
readonly length: number;
@@ -374,7 +374,7 @@ interface DOMStringList {
declare var DOMStringList: {
prototype: DOMStringList;
new(): DOMStringList;
}
};
interface ErrorEvent extends Event {
readonly colno: number;
@@ -388,12 +388,12 @@ interface ErrorEvent extends Event {
declare var ErrorEvent: {
prototype: ErrorEvent;
new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
}
};
interface Event {
readonly bubbles: boolean;
cancelBubble: boolean;
readonly cancelable: boolean;
cancelBubble: boolean;
readonly currentTarget: EventTarget;
readonly defaultPrevented: boolean;
readonly eventPhase: number;
@@ -420,7 +420,7 @@ declare var Event: {
readonly AT_TARGET: number;
readonly BUBBLING_PHASE: number;
readonly CAPTURING_PHASE: number;
}
};
interface EventTarget {
addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -431,7 +431,7 @@ interface EventTarget {
declare var EventTarget: {
prototype: EventTarget;
new(): EventTarget;
}
};
interface File extends Blob {
readonly lastModifiedDate: any;
@@ -442,7 +442,7 @@ interface File extends Blob {
declare var File: {
prototype: File;
new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
}
};
interface FileList {
readonly length: number;
@@ -453,7 +453,7 @@ interface FileList {
declare var FileList: {
prototype: FileList;
new(): FileList;
}
};
interface FileReader extends EventTarget, MSBaseReader {
readonly error: DOMError;
@@ -468,8 +468,17 @@ interface FileReader extends EventTarget, MSBaseReader {
declare var FileReader: {
prototype: FileReader;
new(): FileReader;
};
interface FormData {
append(name: string, value: string | Blob, fileName?: string): void;
}
declare var FormData: {
prototype: FormData;
new(): FormData;
};
interface Headers {
append(name: string, value: string): void;
delete(name: string): void;
@@ -482,7 +491,7 @@ interface Headers {
declare var Headers: {
prototype: Headers;
new(init?: any): Headers;
}
};
interface IDBCursor {
readonly direction: IDBCursorDirection;
@@ -506,7 +515,7 @@ declare var IDBCursor: {
readonly NEXT_NO_DUPLICATE: string;
readonly PREV: string;
readonly PREV_NO_DUPLICATE: string;
}
};
interface IDBCursorWithValue extends IDBCursor {
readonly value: any;
@@ -515,7 +524,7 @@ interface IDBCursorWithValue extends IDBCursor {
declare var IDBCursorWithValue: {
prototype: IDBCursorWithValue;
new(): IDBCursorWithValue;
}
};
interface IDBDatabaseEventMap {
"abort": Event;
@@ -532,7 +541,7 @@ interface IDBDatabase extends EventTarget {
close(): void;
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
deleteObjectStore(name: string): void;
transaction(storeNames: string | string[], mode?: string): IDBTransaction;
transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction;
addEventListener(type: "versionchange", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
@@ -541,7 +550,7 @@ interface IDBDatabase extends EventTarget {
declare var IDBDatabase: {
prototype: IDBDatabase;
new(): IDBDatabase;
}
};
interface IDBFactory {
cmp(first: any, second: any): number;
@@ -552,7 +561,7 @@ interface IDBFactory {
declare var IDBFactory: {
prototype: IDBFactory;
new(): IDBFactory;
}
};
interface IDBIndex {
keyPath: string | string[];
@@ -563,14 +572,14 @@ interface IDBIndex {
count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
get(key: IDBKeyRange | IDBValidKey): IDBRequest;
getKey(key: IDBKeyRange | IDBValidKey): IDBRequest;
openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
}
declare var IDBIndex: {
prototype: IDBIndex;
new(): IDBIndex;
}
};
interface IDBKeyRange {
readonly lower: any;
@@ -586,7 +595,7 @@ declare var IDBKeyRange: {
lowerBound(lower: any, open?: boolean): IDBKeyRange;
only(value: any): IDBKeyRange;
upperBound(upper: any, open?: boolean): IDBKeyRange;
}
};
interface IDBObjectStore {
readonly indexNames: DOMStringList;
@@ -602,14 +611,14 @@ interface IDBObjectStore {
deleteIndex(indexName: string): void;
get(key: any): IDBRequest;
index(name: string): IDBIndex;
openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
}
declare var IDBObjectStore: {
prototype: IDBObjectStore;
new(): IDBObjectStore;
}
};
interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
"blocked": Event;
@@ -626,7 +635,7 @@ interface IDBOpenDBRequest extends IDBRequest {
declare var IDBOpenDBRequest: {
prototype: IDBOpenDBRequest;
new(): IDBOpenDBRequest;
}
};
interface IDBRequestEventMap {
"error": Event;
@@ -634,7 +643,7 @@ interface IDBRequestEventMap {
}
interface IDBRequest extends EventTarget {
readonly error: DOMError;
readonly error: DOMException;
onerror: (this: IDBRequest, ev: Event) => any;
onsuccess: (this: IDBRequest, ev: Event) => any;
readonly readyState: IDBRequestReadyState;
@@ -648,7 +657,7 @@ interface IDBRequest extends EventTarget {
declare var IDBRequest: {
prototype: IDBRequest;
new(): IDBRequest;
}
};
interface IDBTransactionEventMap {
"abort": Event;
@@ -658,7 +667,7 @@ interface IDBTransactionEventMap {
interface IDBTransaction extends EventTarget {
readonly db: IDBDatabase;
readonly error: DOMError;
readonly error: DOMException;
readonly mode: IDBTransactionMode;
onabort: (this: IDBTransaction, ev: Event) => any;
oncomplete: (this: IDBTransaction, ev: Event) => any;
@@ -678,7 +687,7 @@ declare var IDBTransaction: {
readonly READ_ONLY: string;
readonly READ_WRITE: string;
readonly VERSION_CHANGE: string;
}
};
interface IDBVersionChangeEvent extends Event {
readonly newVersion: number | null;
@@ -688,7 +697,7 @@ interface IDBVersionChangeEvent extends Event {
declare var IDBVersionChangeEvent: {
prototype: IDBVersionChangeEvent;
new(): IDBVersionChangeEvent;
}
};
interface ImageData {
data: Uint8ClampedArray;
@@ -700,7 +709,7 @@ declare var ImageData: {
prototype: ImageData;
new(width: number, height: number): ImageData;
new(array: Uint8ClampedArray, width: number, height: number): ImageData;
}
};
interface MessageChannel {
readonly port1: MessagePort;
@@ -710,7 +719,7 @@ interface MessageChannel {
declare var MessageChannel: {
prototype: MessageChannel;
new(): MessageChannel;
}
};
interface MessageEvent extends Event {
readonly data: any;
@@ -723,7 +732,7 @@ interface MessageEvent extends Event {
declare var MessageEvent: {
prototype: MessageEvent;
new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
}
};
interface MessagePortEventMap {
"message": MessageEvent;
@@ -741,7 +750,7 @@ interface MessagePort extends EventTarget {
declare var MessagePort: {
prototype: MessagePort;
new(): MessagePort;
}
};
interface NotificationEventMap {
"click": Event;
@@ -771,7 +780,7 @@ declare var Notification: {
prototype: Notification;
new(title: string, options?: NotificationOptions): Notification;
requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
}
};
interface Performance {
readonly navigation: PerformanceNavigation;
@@ -794,7 +803,7 @@ interface Performance {
declare var Performance: {
prototype: Performance;
new(): Performance;
}
};
interface PerformanceNavigation {
readonly redirectCount: number;
@@ -813,18 +822,18 @@ declare var PerformanceNavigation: {
readonly TYPE_NAVIGATE: number;
readonly TYPE_RELOAD: number;
readonly TYPE_RESERVED: number;
}
};
interface PerformanceTiming {
readonly connectEnd: number;
readonly connectStart: number;
readonly domainLookupEnd: number;
readonly domainLookupStart: number;
readonly domComplete: number;
readonly domContentLoadedEventEnd: number;
readonly domContentLoadedEventStart: number;
readonly domInteractive: number;
readonly domLoading: number;
readonly domainLookupEnd: number;
readonly domainLookupStart: number;
readonly fetchStart: number;
readonly loadEventEnd: number;
readonly loadEventStart: number;
@@ -844,7 +853,7 @@ interface PerformanceTiming {
declare var PerformanceTiming: {
prototype: PerformanceTiming;
new(): PerformanceTiming;
}
};
interface Position {
readonly coords: Coordinates;
@@ -854,7 +863,7 @@ interface Position {
declare var Position: {
prototype: Position;
new(): Position;
}
};
interface PositionError {
readonly code: number;
@@ -871,7 +880,7 @@ declare var PositionError: {
readonly PERMISSION_DENIED: number;
readonly POSITION_UNAVAILABLE: number;
readonly TIMEOUT: number;
}
};
interface ProgressEvent extends Event {
readonly lengthComputable: boolean;
@@ -883,7 +892,7 @@ interface ProgressEvent extends Event {
declare var ProgressEvent: {
prototype: ProgressEvent;
new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
}
};
interface PushManager {
getSubscription(): Promise<PushSubscription>;
@@ -894,7 +903,7 @@ interface PushManager {
declare var PushManager: {
prototype: PushManager;
new(): PushManager;
}
};
interface PushSubscription {
readonly endpoint: USVString;
@@ -907,7 +916,7 @@ interface PushSubscription {
declare var PushSubscription: {
prototype: PushSubscription;
new(): PushSubscription;
}
};
interface PushSubscriptionOptions {
readonly applicationServerKey: ArrayBuffer | null;
@@ -917,7 +926,7 @@ interface PushSubscriptionOptions {
declare var PushSubscriptionOptions: {
prototype: PushSubscriptionOptions;
new(): PushSubscriptionOptions;
}
};
interface ReadableStream {
readonly locked: boolean;
@@ -928,7 +937,7 @@ interface ReadableStream {
declare var ReadableStream: {
prototype: ReadableStream;
new(): ReadableStream;
}
};
interface ReadableStreamReader {
cancel(): Promise<void>;
@@ -939,7 +948,7 @@ interface ReadableStreamReader {
declare var ReadableStreamReader: {
prototype: ReadableStreamReader;
new(): ReadableStreamReader;
}
};
interface Request extends Object, Body {
readonly cache: RequestCache;
@@ -961,7 +970,7 @@ interface Request extends Object, Body {
declare var Request: {
prototype: Request;
new(input: Request | string, init?: RequestInit): Request;
}
};
interface Response extends Object, Body {
readonly body: ReadableStream | null;
@@ -977,7 +986,9 @@ interface Response extends Object, Body {
declare var Response: {
prototype: Response;
new(body?: any, init?: ResponseInit): Response;
}
error: () => Response;
redirect: (url: string, status?: number) => Response;
};
interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
"statechange": Event;
@@ -995,7 +1006,7 @@ interface ServiceWorker extends EventTarget, AbstractWorker {
declare var ServiceWorker: {
prototype: ServiceWorker;
new(): ServiceWorker;
}
};
interface ServiceWorkerRegistrationEventMap {
"updatefound": Event;
@@ -1020,7 +1031,7 @@ interface ServiceWorkerRegistration extends EventTarget {
declare var ServiceWorkerRegistration: {
prototype: ServiceWorkerRegistration;
new(): ServiceWorkerRegistration;
}
};
interface SyncManager {
getTags(): any;
@@ -1030,7 +1041,7 @@ interface SyncManager {
declare var SyncManager: {
prototype: SyncManager;
new(): SyncManager;
}
};
interface URL {
hash: string;
@@ -1053,7 +1064,7 @@ declare var URL: {
new(url: string, base?: string): URL;
createObjectURL(object: any, options?: ObjectURLOptions): string;
revokeObjectURL(url: string): void;
}
};
interface WebSocketEventMap {
"close": CloseEvent;
@@ -1090,7 +1101,7 @@ declare var WebSocket: {
readonly CLOSING: number;
readonly CONNECTING: number;
readonly OPEN: number;
}
};
interface WorkerEventMap extends AbstractWorkerEventMap {
"message": MessageEvent;
@@ -1107,7 +1118,7 @@ interface Worker extends EventTarget, AbstractWorker {
declare var Worker: {
prototype: Worker;
new(stringUrl: string): Worker;
}
};
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
"readystatechange": Event;
@@ -1153,7 +1164,7 @@ declare var XMLHttpRequest: {
readonly LOADING: number;
readonly OPENED: number;
readonly UNSENT: number;
}
};
interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
@@ -1163,7 +1174,7 @@ interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
declare var XMLHttpRequestUpload: {
prototype: XMLHttpRequestUpload;
new(): XMLHttpRequestUpload;
}
};
interface AbstractWorkerEventMap {
"error": ErrorEvent;
@@ -1278,7 +1289,7 @@ interface Client {
declare var Client: {
prototype: Client;
new(): Client;
}
};
interface Clients {
claim(): Promise<void>;
@@ -1290,7 +1301,7 @@ interface Clients {
declare var Clients: {
prototype: Clients;
new(): Clients;
}
};
interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
"message": MessageEvent;
@@ -1307,7 +1318,7 @@ interface DedicatedWorkerGlobalScope extends WorkerGlobalScope {
declare var DedicatedWorkerGlobalScope: {
prototype: DedicatedWorkerGlobalScope;
new(): DedicatedWorkerGlobalScope;
}
};
interface ExtendableEvent extends Event {
waitUntil(f: Promise<any>): void;
@@ -1316,7 +1327,7 @@ interface ExtendableEvent extends Event {
declare var ExtendableEvent: {
prototype: ExtendableEvent;
new(type: string, eventInitDict?: ExtendableEventInit): ExtendableEvent;
}
};
interface ExtendableMessageEvent extends ExtendableEvent {
readonly data: any;
@@ -1329,7 +1340,7 @@ interface ExtendableMessageEvent extends ExtendableEvent {
declare var ExtendableMessageEvent: {
prototype: ExtendableMessageEvent;
new(type: string, eventInitDict?: ExtendableMessageEventInit): ExtendableMessageEvent;
}
};
interface FetchEvent extends ExtendableEvent {
readonly clientId: string | null;
@@ -1341,7 +1352,7 @@ interface FetchEvent extends ExtendableEvent {
declare var FetchEvent: {
prototype: FetchEvent;
new(type: string, eventInitDict: FetchEventInit): FetchEvent;
}
};
interface FileReaderSync {
readAsArrayBuffer(blob: Blob): any;
@@ -1353,7 +1364,7 @@ interface FileReaderSync {
declare var FileReaderSync: {
prototype: FileReaderSync;
new(): FileReaderSync;
}
};
interface NotificationEvent extends ExtendableEvent {
readonly action: string;
@@ -1363,7 +1374,7 @@ interface NotificationEvent extends ExtendableEvent {
declare var NotificationEvent: {
prototype: NotificationEvent;
new(type: string, eventInitDict: NotificationEventInit): NotificationEvent;
}
};
interface PushEvent extends ExtendableEvent {
readonly data: PushMessageData | null;
@@ -1372,7 +1383,7 @@ interface PushEvent extends ExtendableEvent {
declare var PushEvent: {
prototype: PushEvent;
new(type: string, eventInitDict?: PushEventInit): PushEvent;
}
};
interface PushMessageData {
arrayBuffer(): ArrayBuffer;
@@ -1384,7 +1395,7 @@ interface PushMessageData {
declare var PushMessageData: {
prototype: PushMessageData;
new(): PushMessageData;
}
};
interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
"activate": ExtendableEvent;
@@ -1418,7 +1429,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
declare var ServiceWorkerGlobalScope: {
prototype: ServiceWorkerGlobalScope;
new(): ServiceWorkerGlobalScope;
}
};
interface SyncEvent extends ExtendableEvent {
readonly lastChance: boolean;
@@ -1428,7 +1439,7 @@ interface SyncEvent extends ExtendableEvent {
declare var SyncEvent: {
prototype: SyncEvent;
new(type: string, init: SyncEventInit): SyncEvent;
}
};
interface WindowClient extends Client {
readonly focused: boolean;
@@ -1440,7 +1451,7 @@ interface WindowClient extends Client {
declare var WindowClient: {
prototype: WindowClient;
new(): WindowClient;
}
};
interface WorkerGlobalScopeEventMap {
"error": ErrorEvent;
@@ -1463,7 +1474,7 @@ interface WorkerGlobalScope extends EventTarget, WorkerUtils, WindowConsole, Glo
declare var WorkerGlobalScope: {
prototype: WorkerGlobalScope;
new(): WorkerGlobalScope;
}
};
interface WorkerLocation {
readonly hash: string;
@@ -1481,7 +1492,7 @@ interface WorkerLocation {
declare var WorkerLocation: {
prototype: WorkerLocation;
new(): WorkerLocation;
}
};
interface WorkerNavigator extends Object, NavigatorID, NavigatorOnLine, NavigatorBeacon, NavigatorConcurrentHardware {
readonly hardwareConcurrency: number;
@@ -1490,7 +1501,7 @@ interface WorkerNavigator extends Object, NavigatorID, NavigatorOnLine, Navigato
declare var WorkerNavigator: {
prototype: WorkerNavigator;
new(): WorkerNavigator;
}
};
interface WorkerUtils extends Object, WindowBase64 {
readonly indexedDB: IDBFactory;
@@ -1533,38 +1544,38 @@ interface ImageBitmap {
interface URLSearchParams {
/**
* Appends a specified key/value pair as a new search parameter.
*/
* Appends a specified key/value pair as a new search parameter.
*/
append(name: string, value: string): void;
/**
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
*/
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
*/
delete(name: string): void;
/**
* Returns the first value associated to the given search parameter.
*/
* Returns the first value associated to the given search parameter.
*/
get(name: string): string | null;
/**
* Returns all the values association with a given search parameter.
*/
* Returns all the values association with a given search parameter.
*/
getAll(name: string): string[];
/**
* Returns a Boolean indicating if such a search parameter exists.
*/
* Returns a Boolean indicating if such a search parameter exists.
*/
has(name: string): boolean;
/**
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
*/
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
*/
set(name: string, value: string): void;
}
declare var URLSearchParams: {
prototype: URLSearchParams;
/**
* Constructor returning a URLSearchParams object.
*/
* Constructor returning a URLSearchParams object.
*/
new (init?: string | URLSearchParams): URLSearchParams;
}
};
interface BlobPropertyBag {
type?: string;
@@ -1771,8 +1782,23 @@ interface AddEventListenerOptions extends EventListenerOptions {
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
interface DecodeErrorCallback {
(error: DOMException): void;
}
interface DecodeSuccessCallback {
(decodedData: AudioBuffer): void;
}
interface ErrorEventHandler {
(message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void;
(message: string, filename?: string, lineno?: number, colno?: number, error?: Error): void;
}
interface ForEachCallback {
(keyId: any, status: MediaKeyStatus): void;
}
interface FunctionStringCallback {
(data: string): void;
}
interface NotificationPermissionCallback {
(permission: NotificationPermission): void;
}
interface PositionCallback {
(position: Position): void;
@@ -1780,21 +1806,6 @@ interface PositionCallback {
interface PositionErrorCallback {
(error: PositionError): void;
}
interface DecodeSuccessCallback {
(decodedData: AudioBuffer): void;
}
interface DecodeErrorCallback {
(error: DOMException): void;
}
interface FunctionStringCallback {
(data: string): void;
}
interface ForEachCallback {
(keyId: any, status: MediaKeyStatus): void;
}
interface NotificationPermissionCallback {
(permission: NotificationPermission): void;
}
declare var onmessage: (this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any;
declare function close(): void;
declare function postMessage(message: any, transfer?: any[]): void;
+121 -93
View File
@@ -2,51 +2,54 @@
* Declaration module describing the TypeScript Server protocol
*/
declare namespace ts.server.protocol {
namespace CommandTypes {
type Brace = "brace";
type BraceCompletion = "braceCompletion";
type Change = "change";
type Close = "close";
type Completions = "completions";
type CompletionDetails = "completionEntryDetails";
type CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList";
type CompileOnSaveEmitFile = "compileOnSaveEmitFile";
type Configure = "configure";
type Definition = "definition";
type Implementation = "implementation";
type Exit = "exit";
type Format = "format";
type Formatonkey = "formatonkey";
type Geterr = "geterr";
type GeterrForProject = "geterrForProject";
type SemanticDiagnosticsSync = "semanticDiagnosticsSync";
type SyntacticDiagnosticsSync = "syntacticDiagnosticsSync";
type NavBar = "navbar";
type Navto = "navto";
type NavTree = "navtree";
type NavTreeFull = "navtree-full";
type Occurrences = "occurrences";
type DocumentHighlights = "documentHighlights";
type Open = "open";
type Quickinfo = "quickinfo";
type References = "references";
type Reload = "reload";
type Rename = "rename";
type Saveto = "saveto";
type SignatureHelp = "signatureHelp";
type TypeDefinition = "typeDefinition";
type ProjectInfo = "projectInfo";
type ReloadProjects = "reloadProjects";
type Unknown = "unknown";
type OpenExternalProject = "openExternalProject";
type OpenExternalProjects = "openExternalProjects";
type CloseExternalProject = "closeExternalProject";
type TodoComments = "todoComments";
type Indentation = "indentation";
type DocCommentTemplate = "docCommentTemplate";
type CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects";
type GetCodeFixes = "getCodeFixes";
type GetSupportedCodeFixes = "getSupportedCodeFixes";
const enum CommandTypes {
Brace = "brace",
BraceCompletion = "braceCompletion",
Change = "change",
Close = "close",
Completions = "completions",
CompletionDetails = "completionEntryDetails",
CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList",
CompileOnSaveEmitFile = "compileOnSaveEmitFile",
Configure = "configure",
Definition = "definition",
Implementation = "implementation",
Exit = "exit",
Format = "format",
Formatonkey = "formatonkey",
Geterr = "geterr",
GeterrForProject = "geterrForProject",
SemanticDiagnosticsSync = "semanticDiagnosticsSync",
SyntacticDiagnosticsSync = "syntacticDiagnosticsSync",
NavBar = "navbar",
Navto = "navto",
NavTree = "navtree",
NavTreeFull = "navtree-full",
Occurrences = "occurrences",
DocumentHighlights = "documentHighlights",
Open = "open",
Quickinfo = "quickinfo",
References = "references",
Reload = "reload",
Rename = "rename",
Saveto = "saveto",
SignatureHelp = "signatureHelp",
TypeDefinition = "typeDefinition",
ProjectInfo = "projectInfo",
ReloadProjects = "reloadProjects",
Unknown = "unknown",
OpenExternalProject = "openExternalProject",
OpenExternalProjects = "openExternalProjects",
CloseExternalProject = "closeExternalProject",
TodoComments = "todoComments",
Indentation = "indentation",
DocCommentTemplate = "docCommentTemplate",
CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects",
GetCodeFixes = "getCodeFixes",
GetSupportedCodeFixes = "getSupportedCodeFixes",
GetApplicableRefactors = "getApplicableRefactors",
GetRefactorCodeActions = "getRefactorCodeActions",
GetRefactorCodeActionsFull = "getRefactorCodeActions-full",
}
/**
* A TypeScript Server message
@@ -287,6 +290,33 @@ declare namespace ts.server.protocol {
*/
offset: number;
}
type FileLocationOrRangeRequestArgs = FileLocationRequestArgs | FileRangeRequestArgs;
interface GetApplicableRefactorsRequest extends Request {
command: CommandTypes.GetApplicableRefactors;
arguments: GetApplicableRefactorsRequestArgs;
}
type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs;
interface ApplicableRefactorInfo {
name: string;
description: string;
}
interface GetApplicableRefactorsResponse extends Response {
body?: ApplicableRefactorInfo[];
}
interface GetRefactorCodeActionsRequest extends Request {
command: CommandTypes.GetRefactorCodeActions;
arguments: GetRefactorCodeActionsRequestArgs;
}
type GetRefactorCodeActionsRequestArgs = FileLocationOrRangeRequestArgs & {
refactorName: string;
};
type RefactorCodeActions = {
actions: protocol.CodeAction[];
renameLocation?: number;
};
interface GetRefactorCodeActionsResponse extends Response {
body: RefactorCodeActions;
}
/**
* Request for the available codefixes at a specific position.
*/
@@ -294,10 +324,7 @@ declare namespace ts.server.protocol {
command: CommandTypes.GetCodeFixes;
arguments: CodeFixRequestArgs;
}
/**
* Instances of this interface specify errorcodes on a specific location in a sourcefile.
*/
interface CodeFixRequestArgs extends FileRequestArgs {
interface FileRangeRequestArgs extends FileRequestArgs {
/**
* The line number for the request (1-based).
*/
@@ -314,6 +341,11 @@ declare namespace ts.server.protocol {
* The character offset (on the line) for the request (1-based).
*/
endOffset: number;
}
/**
* Instances of this interface specify errorcodes on a specific location in a sourcefile.
*/
interface CodeFixRequestArgs extends FileRangeRequestArgs {
/**
* Errorcodes we want to get the fixes for.
*/
@@ -488,10 +520,9 @@ declare namespace ts.server.protocol {
}
/**
* Span augmented with extra information that denotes the kind of the highlighting to be used for span.
* Kind is taken from HighlightSpanKind type.
*/
interface HighlightSpan extends TextSpan {
kind: string;
kind: HighlightSpanKind;
}
/**
* Represents a set of highligh spans for a give name
@@ -609,7 +640,7 @@ declare namespace ts.server.protocol {
/**
* The items's kind (such as 'className' or 'parameterName' or plain 'text').
*/
kind: string;
kind: ScriptElementKind;
/**
* Optional modifiers for the kind (such as 'public').
*/
@@ -957,7 +988,7 @@ declare namespace ts.server.protocol {
/**
* The symbol's kind (such as 'className' or 'parameterName' or plain 'text').
*/
kind: string;
kind: ScriptElementKind;
/**
* Optional modifiers for the kind (such as 'public').
*/
@@ -1143,7 +1174,7 @@ declare namespace ts.server.protocol {
/**
* The symbol's kind (such as 'className' or 'parameterName').
*/
kind: string;
kind: ScriptElementKind;
/**
* Optional modifiers for the kind (such as 'public').
*/
@@ -1170,7 +1201,7 @@ declare namespace ts.server.protocol {
/**
* The symbol's kind (such as 'className' or 'parameterName').
*/
kind: string;
kind: ScriptElementKind;
/**
* Optional modifiers for the kind (such as 'public').
*/
@@ -1563,7 +1594,7 @@ declare namespace ts.server.protocol {
/**
* The symbol's kind (such as 'className' or 'parameterName').
*/
kind: string;
kind: ScriptElementKind;
/**
* exact, substring, or prefix.
*/
@@ -1596,7 +1627,7 @@ declare namespace ts.server.protocol {
/**
* Kind of symbol's container symbol (if any).
*/
containerKind?: string;
containerKind?: ScriptElementKind;
}
/**
* Navto response message. Body is an array of navto items. Each
@@ -1660,7 +1691,7 @@ declare namespace ts.server.protocol {
/**
* The symbol's kind (such as 'className' or 'parameterName').
*/
kind: string;
kind: ScriptElementKind;
/**
* Optional modifiers for the kind (such as 'public').
*/
@@ -1681,7 +1712,7 @@ declare namespace ts.server.protocol {
/** protocol.NavigationTree is identical to ts.NavigationTree, except using protocol.TextSpan instead of ts.TextSpan */
interface NavigationTree {
text: string;
kind: string;
kind: ScriptElementKind;
kindModifiers: string;
spans: TextSpan[];
childItems?: NavigationTree[];
@@ -1756,12 +1787,11 @@ declare namespace ts.server.protocol {
interface NavTreeResponse extends Response {
body?: NavigationTree;
}
namespace IndentStyle {
type None = "None";
type Block = "Block";
type Smart = "Smart";
const enum IndentStyle {
None = "None",
Block = "Block",
Smart = "Smart",
}
type IndentStyle = IndentStyle.None | IndentStyle.Block | IndentStyle.Smart;
interface EditorSettings {
baseIndentSize?: number;
indentSize?: number;
@@ -1782,6 +1812,7 @@ declare namespace ts.server.protocol {
insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
insertSpaceAfterTypeAssertion?: boolean;
insertSpaceBeforeFunctionParenthesis?: boolean;
placeOpenBraceOnNewLineForFunctions?: boolean;
placeOpenBraceOnNewLineForControlBlocks?: boolean;
@@ -1854,40 +1885,35 @@ declare namespace ts.server.protocol {
typeRoots?: string[];
[option: string]: CompilerOptionsValue | undefined;
}
namespace JsxEmit {
type None = "None";
type Preserve = "Preserve";
type ReactNative = "ReactNative";
type React = "React";
const enum JsxEmit {
None = "None",
Preserve = "Preserve",
ReactNative = "ReactNative",
React = "React",
}
type JsxEmit = JsxEmit.None | JsxEmit.Preserve | JsxEmit.React | JsxEmit.ReactNative;
namespace ModuleKind {
type None = "None";
type CommonJS = "CommonJS";
type AMD = "AMD";
type UMD = "UMD";
type System = "System";
type ES6 = "ES6";
type ES2015 = "ES2015";
const enum ModuleKind {
None = "None",
CommonJS = "CommonJS",
AMD = "AMD",
UMD = "UMD",
System = "System",
ES6 = "ES6",
ES2015 = "ES2015",
}
type ModuleKind = ModuleKind.None | ModuleKind.CommonJS | ModuleKind.AMD | ModuleKind.UMD | ModuleKind.System | ModuleKind.ES6 | ModuleKind.ES2015;
namespace ModuleResolutionKind {
type Classic = "Classic";
type Node = "Node";
const enum ModuleResolutionKind {
Classic = "Classic",
Node = "Node",
}
type ModuleResolutionKind = ModuleResolutionKind.Classic | ModuleResolutionKind.Node;
namespace NewLineKind {
type Crlf = "Crlf";
type Lf = "Lf";
const enum NewLineKind {
Crlf = "Crlf",
Lf = "Lf",
}
type NewLineKind = NewLineKind.Crlf | NewLineKind.Lf;
namespace ScriptTarget {
type ES3 = "ES3";
type ES5 = "ES5";
type ES6 = "ES6";
type ES2015 = "ES2015";
const enum ScriptTarget {
ES3 = "ES3",
ES5 = "ES5",
ES6 = "ES6",
ES2015 = "ES2015",
}
type ScriptTarget = ScriptTarget.ES3 | ScriptTarget.ES5 | ScriptTarget.ES6 | ScriptTarget.ES2015;
}
declare namespace ts.server.protocol {
@@ -1943,6 +1969,8 @@ declare namespace ts.server.protocol {
}
declare namespace ts {
// these types are empty stubs for types from services and should not be used directly
export type HighlightSpanKind = never;
export type ScriptElementKind = never;
export type ScriptKind = never;
export type IndentStyle = never;
export type JsxEmit = never;
+2400 -2740
View File
File diff suppressed because it is too large Load Diff
+3317 -2013
View File
File diff suppressed because it is too large Load Diff
+475 -266
View File
File diff suppressed because it is too large Load Diff
+3296 -1998
View File
File diff suppressed because it is too large Load Diff
+380 -122
View File
@@ -414,6 +414,7 @@ declare namespace ts {
JavaScriptFile = 65536,
ThisNodeOrAnySubNodesHasError = 131072,
HasAggregatedChildData = 262144,
PossiblyContainDynamicImport = 524288,
BlockScoped = 3,
ReachabilityCheckFlags = 384,
ReachabilityAndEmitFlags = 1408,
@@ -691,6 +692,7 @@ declare namespace ts {
interface ConstructorTypeNode extends TypeNode, SignatureDeclaration {
kind: SyntaxKind.ConstructorType;
}
type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference;
interface TypeReferenceNode extends TypeNode {
kind: SyntaxKind.TypeReference;
typeName: EntityName;
@@ -768,22 +770,24 @@ declare namespace ts {
interface UnaryExpression extends Expression {
_unaryExpressionBrand: any;
}
interface IncrementExpression extends UnaryExpression {
_incrementExpressionBrand: any;
/** Deprecated, please use UpdateExpression */
type IncrementExpression = UpdateExpression;
interface UpdateExpression extends UnaryExpression {
_updateExpressionBrand: any;
}
type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken;
interface PrefixUnaryExpression extends IncrementExpression {
interface PrefixUnaryExpression extends UpdateExpression {
kind: SyntaxKind.PrefixUnaryExpression;
operator: PrefixUnaryOperator;
operand: UnaryExpression;
}
type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
interface PostfixUnaryExpression extends IncrementExpression {
interface PostfixUnaryExpression extends UpdateExpression {
kind: SyntaxKind.PostfixUnaryExpression;
operand: LeftHandSideExpression;
operator: PostfixUnaryOperator;
}
interface LeftHandSideExpression extends IncrementExpression {
interface LeftHandSideExpression extends UpdateExpression {
_leftHandSideExpressionBrand: any;
}
interface MemberExpression extends LeftHandSideExpression {
@@ -804,6 +808,9 @@ declare namespace ts {
interface SuperExpression extends PrimaryExpression {
kind: SyntaxKind.SuperKeyword;
}
interface ImportExpression extends PrimaryExpression {
kind: SyntaxKind.ImportKeyword;
}
interface DeleteExpression extends UnaryExpression {
kind: SyntaxKind.DeleteExpression;
expression: UnaryExpression;
@@ -988,6 +995,9 @@ declare namespace ts {
interface SuperCall extends CallExpression {
expression: SuperExpression;
}
interface ImportCall extends CallExpression {
expression: ImportExpression;
}
interface ExpressionWithTypeArguments extends TypeNode {
kind: SyntaxKind.ExpressionWithTypeArguments;
parent?: HeritageClause;
@@ -1458,6 +1468,7 @@ declare namespace ts {
comment: string | undefined;
}
interface JSDocTag extends Node {
parent: JSDoc;
atToken: AtToken;
tagName: Identifier;
comment: string | undefined;
@@ -1482,6 +1493,7 @@ declare namespace ts {
typeExpression: JSDocTypeExpression;
}
interface JSDocTypedefTag extends JSDocTag, NamedDeclaration {
parent: JSDoc;
kind: SyntaxKind.JSDocTypedefTag;
fullName?: JSDocNamespaceDeclaration | Identifier;
name?: Identifier;
@@ -1489,9 +1501,15 @@ declare namespace ts {
jsDocTypeLiteral?: JSDocTypeLiteral;
}
interface JSDocPropertyTag extends JSDocTag, TypeElement {
parent: JSDoc;
kind: SyntaxKind.JSDocPropertyTag;
name: Identifier;
/** the parameter name, if provided *before* the type (TypeScript-style) */
preParameterName?: Identifier;
/** the parameter name, if provided *after* the type (JSDoc-standard) */
postParameterName?: Identifier;
typeExpression: JSDocTypeExpression;
isBracketed: boolean;
}
interface JSDocTypeLiteral extends JSDocType {
kind: SyntaxKind.JSDocTypeLiteral;
@@ -1506,7 +1524,7 @@ declare namespace ts {
/** the parameter name, if provided *after* the type (JSDoc-standard) */
postParameterName?: Identifier;
/** the parameter name, regardless of the location it was provided */
parameterName: Identifier;
name: Identifier;
isBracketed: boolean;
}
enum FlowFlags {
@@ -1704,10 +1722,10 @@ declare namespace ts {
getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
getDeclaredTypeOfSymbol(symbol: Symbol): Type;
getPropertiesOfType(type: Type): Symbol[];
getPropertyOfType(type: Type, propertyName: string): Symbol;
getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo;
getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined;
getSignaturesOfType(type: Type, kind: SignatureKind): Signature[];
getIndexTypeOfType(type: Type, kind: IndexKind): Type;
getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
getBaseTypes(type: InterfaceType): BaseType[];
getBaseTypeOfLiteralType(type: Type): Type;
getWidenedType(type: Type): Type;
@@ -1800,23 +1818,24 @@ declare namespace ts {
clear(): void;
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
reportInaccessibleThisError(): void;
reportIllegalExtends(): void;
reportPrivateInBaseOfClassExpression(propertyName: string): void;
}
enum TypeFormatFlags {
None = 0,
WriteArrayAsGenericType = 1,
UseTypeOfFunction = 2,
NoTruncation = 4,
WriteArrowStyleSignature = 8,
WriteOwnNameForAnyLike = 16,
WriteTypeArgumentsOfSignature = 32,
InElementType = 64,
UseFullyQualifiedType = 128,
InFirstTypeArgument = 256,
InTypeAlias = 512,
UseTypeAliasValue = 1024,
SuppressAnyReturnType = 2048,
AddUndefined = 4096,
UseTypeOfFunction = 4,
NoTruncation = 8,
WriteArrowStyleSignature = 16,
WriteOwnNameForAnyLike = 32,
WriteTypeArgumentsOfSignature = 64,
InElementType = 128,
UseFullyQualifiedType = 256,
InFirstTypeArgument = 512,
InTypeAlias = 1024,
UseTypeAliasValue = 2048,
SuppressAnyReturnType = 4096,
AddUndefined = 8192,
WriteClassExpressionAsTypeLiteral = 16384,
}
enum SymbolFormatFlags {
None = 0,
@@ -2062,6 +2081,24 @@ declare namespace ts {
isReadonly: boolean;
declaration?: SignatureDeclaration;
}
enum InferencePriority {
NakedTypeVariable = 1,
MappedType = 2,
ReturnType = 4,
}
interface InferenceInfo {
typeParameter: TypeParameter;
candidates: Type[];
inferredType: Type;
priority: InferencePriority;
topLevel: boolean;
isFixed: boolean;
}
enum InferenceFlags {
InferUnionTypes = 1,
NoDefault = 2,
AnyDefault = 4,
}
interface JsFileExtensionInfo {
extension: string;
isMixedContent: boolean;
@@ -2197,6 +2234,7 @@ declare namespace ts {
UMD = 3,
System = 4,
ES2015 = 5,
ESNext = 6,
}
enum JsxEmit {
None = 0,
@@ -2630,7 +2668,7 @@ declare namespace ts {
scanRange<T>(start: number, length: number, callback: () => T): T;
tryScan<T>(callback: () => T): T;
}
function tokenToString(t: SyntaxKind): string;
function tokenToString(t: SyntaxKind): string | undefined;
function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number;
function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter;
function isWhiteSpaceLike(ch: number): boolean;
@@ -2722,6 +2760,202 @@ declare namespace ts {
* @returns The unescaped identifier text.
*/
function unescapeIdentifier(identifier: string): string;
function getNameOfDeclaration(declaration: Declaration): DeclarationName | undefined;
}
declare namespace ts {
function isNumericLiteral(node: Node): node is NumericLiteral;
function isStringLiteral(node: Node): node is StringLiteral;
function isJsxText(node: Node): node is JsxText;
function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral;
function isNoSubstitutionTemplateLiteral(node: Node): node is LiteralExpression;
function isTemplateHead(node: Node): node is TemplateHead;
function isTemplateMiddle(node: Node): node is TemplateMiddle;
function isTemplateTail(node: Node): node is TemplateTail;
function isIdentifier(node: Node): node is Identifier;
function isQualifiedName(node: Node): node is QualifiedName;
function isComputedPropertyName(node: Node): node is ComputedPropertyName;
function isTypeParameter(node: Node): node is TypeParameterDeclaration;
function isParameter(node: Node): node is ParameterDeclaration;
function isDecorator(node: Node): node is Decorator;
function isPropertySignature(node: Node): node is PropertySignature;
function isPropertyDeclaration(node: Node): node is PropertyDeclaration;
function isMethodSignature(node: Node): node is MethodSignature;
function isMethodDeclaration(node: Node): node is MethodDeclaration;
function isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration;
function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration;
function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration;
function isTypePredicateNode(node: Node): node is TypePredicateNode;
function isTypeReferenceNode(node: Node): node is TypeReferenceNode;
function isFunctionTypeNode(node: Node): node is FunctionTypeNode;
function isConstructorTypeNode(node: Node): node is ConstructorTypeNode;
function isTypeQueryNode(node: Node): node is TypeQueryNode;
function isTypeLiteralNode(node: Node): node is TypeLiteralNode;
function isArrayTypeNode(node: Node): node is ArrayTypeNode;
function isTupleTypeNode(node: Node): node is TupleTypeNode;
function isUnionTypeNode(node: Node): node is UnionTypeNode;
function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode;
function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode;
function isThisTypeNode(node: Node): node is ThisTypeNode;
function isTypeOperatorNode(node: Node): node is TypeOperatorNode;
function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode;
function isMappedTypeNode(node: Node): node is MappedTypeNode;
function isLiteralTypeNode(node: Node): node is LiteralTypeNode;
function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
function isBindingElement(node: Node): node is BindingElement;
function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression;
function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression;
function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression;
function isElementAccessExpression(node: Node): node is ElementAccessExpression;
function isCallExpression(node: Node): node is CallExpression;
function isNewExpression(node: Node): node is NewExpression;
function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression;
function isTypeAssertion(node: Node): node is TypeAssertion;
function isParenthesizedExpression(node: Node): node is ParenthesizedExpression;
function isFunctionExpression(node: Node): node is FunctionExpression;
function isArrowFunction(node: Node): node is ArrowFunction;
function isDeleteExpression(node: Node): node is DeleteExpression;
function isTypeOfExpression(node: Node): node is TypeOfExpression;
function isVoidExpression(node: Node): node is VoidExpression;
function isAwaitExpression(node: Node): node is AwaitExpression;
function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression;
function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression;
function isBinaryExpression(node: Node): node is BinaryExpression;
function isConditionalExpression(node: Node): node is ConditionalExpression;
function isTemplateExpression(node: Node): node is TemplateExpression;
function isYieldExpression(node: Node): node is YieldExpression;
function isSpreadElement(node: Node): node is SpreadElement;
function isClassExpression(node: Node): node is ClassExpression;
function isOmittedExpression(node: Node): node is OmittedExpression;
function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments;
function isAsExpression(node: Node): node is AsExpression;
function isNonNullExpression(node: Node): node is NonNullExpression;
function isMetaProperty(node: Node): node is MetaProperty;
function isTemplateSpan(node: Node): node is TemplateSpan;
function isSemicolonClassElement(node: Node): node is SemicolonClassElement;
function isBlock(node: Node): node is Block;
function isVariableStatement(node: Node): node is VariableStatement;
function isEmptyStatement(node: Node): node is EmptyStatement;
function isExpressionStatement(node: Node): node is ExpressionStatement;
function isIfStatement(node: Node): node is IfStatement;
function isDoStatement(node: Node): node is DoStatement;
function isWhileStatement(node: Node): node is WhileStatement;
function isForStatement(node: Node): node is ForStatement;
function isForInStatement(node: Node): node is ForInStatement;
function isForOfStatement(node: Node): node is ForOfStatement;
function isContinueStatement(node: Node): node is ContinueStatement;
function isBreakStatement(node: Node): node is BreakStatement;
function isReturnStatement(node: Node): node is ReturnStatement;
function isWithStatement(node: Node): node is WithStatement;
function isSwitchStatement(node: Node): node is SwitchStatement;
function isLabeledStatement(node: Node): node is LabeledStatement;
function isThrowStatement(node: Node): node is ThrowStatement;
function isTryStatement(node: Node): node is TryStatement;
function isDebuggerStatement(node: Node): node is DebuggerStatement;
function isVariableDeclaration(node: Node): node is VariableDeclaration;
function isVariableDeclarationList(node: Node): node is VariableDeclarationList;
function isFunctionDeclaration(node: Node): node is FunctionDeclaration;
function isClassDeclaration(node: Node): node is ClassDeclaration;
function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration;
function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration;
function isEnumDeclaration(node: Node): node is EnumDeclaration;
function isModuleDeclaration(node: Node): node is ModuleDeclaration;
function isModuleBlock(node: Node): node is ModuleBlock;
function isCaseBlock(node: Node): node is CaseBlock;
function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration;
function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration;
function isImportDeclaration(node: Node): node is ImportDeclaration;
function isImportClause(node: Node): node is ImportClause;
function isNamespaceImport(node: Node): node is NamespaceImport;
function isNamedImports(node: Node): node is NamedImports;
function isImportSpecifier(node: Node): node is ImportSpecifier;
function isExportAssignment(node: Node): node is ExportAssignment;
function isExportDeclaration(node: Node): node is ExportDeclaration;
function isNamedExports(node: Node): node is NamedExports;
function isExportSpecifier(node: Node): node is ExportSpecifier;
function isMissingDeclaration(node: Node): node is MissingDeclaration;
function isExternalModuleReference(node: Node): node is ExternalModuleReference;
function isJsxElement(node: Node): node is JsxElement;
function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement;
function isJsxOpeningElement(node: Node): node is JsxOpeningElement;
function isJsxClosingElement(node: Node): node is JsxClosingElement;
function isJsxAttribute(node: Node): node is JsxAttribute;
function isJsxAttributes(node: Node): node is JsxAttributes;
function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
function isJsxExpression(node: Node): node is JsxExpression;
function isCaseClause(node: Node): node is CaseClause;
function isDefaultClause(node: Node): node is DefaultClause;
function isHeritageClause(node: Node): node is HeritageClause;
function isCatchClause(node: Node): node is CatchClause;
function isPropertyAssignment(node: Node): node is PropertyAssignment;
function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment;
function isSpreadAssignment(node: Node): node is SpreadAssignment;
function isEnumMember(node: Node): node is EnumMember;
function isSourceFile(node: Node): node is SourceFile;
function isBundle(node: Node): node is Bundle;
function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
function isJSDocAllType(node: JSDocAllType): node is JSDocAllType;
function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
function isJSDocArrayType(node: Node): node is JSDocArrayType;
function isJSDocUnionType(node: Node): node is JSDocUnionType;
function isJSDocTupleType(node: Node): node is JSDocTupleType;
function isJSDocNullableType(node: Node): node is JSDocNullableType;
function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType;
function isJSDocRecordType(node: Node): node is JSDocRecordType;
function isJSDocRecordMember(node: Node): node is JSDocRecordMember;
function isJSDocTypeReference(node: Node): node is JSDocTypeReference;
function isJSDocOptionalType(node: Node): node is JSDocOptionalType;
function isJSDocFunctionType(node: Node): node is JSDocFunctionType;
function isJSDocVariadicType(node: Node): node is JSDocVariadicType;
function isJSDocConstructorType(node: Node): node is JSDocConstructorType;
function isJSDocThisType(node: Node): node is JSDocThisType;
function isJSDoc(node: Node): node is JSDoc;
function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag;
function isJSDocParameterTag(node: Node): node is JSDocParameterTag;
function isJSDocReturnTag(node: Node): node is JSDocReturnTag;
function isJSDocTypeTag(node: Node): node is JSDocTypeTag;
function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag;
function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag;
function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral;
function isJSDocLiteralType(node: Node): node is JSDocLiteralType;
}
declare namespace ts {
/**
* True if node is of some token syntax kind.
* For example, this is true for an IfKeyword but not for an IfStatement.
*/
function isToken(n: Node): boolean;
function isLiteralExpression(node: Node): node is LiteralExpression;
function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail;
function isModifier(node: Node): node is Modifier;
function isEntityName(node: Node): node is EntityName;
function isPropertyName(node: Node): node is PropertyName;
function isBindingName(node: Node): node is BindingName;
function isFunctionLike(node: Node): node is FunctionLikeDeclaration;
function isClassElement(node: Node): node is ClassElement;
function isClassLike(node: Node): node is ClassLikeDeclaration;
function isAccessor(node: Node): node is AccessorDeclaration;
function isTypeElement(node: Node): node is TypeElement;
function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike;
/**
* Node test that determines whether a node is a valid type node.
* This differs from the `isPartOfTypeNode` function which determines whether a node is *part*
* of a TypeNode.
*/
function isTypeNode(node: Node): node is TypeNode;
function isFunctionOrConstructorTypeNode(node: Node): node is FunctionTypeNode | ConstructorTypeNode;
function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName;
function isCallLikeExpression(node: Node): node is CallLikeExpression;
function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression;
function isTemplateLiteral(node: Node): node is TemplateLiteral;
function isAssertionExpression(node: Node): node is AssertionExpression;
function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement;
function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement;
function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause;
}
declare namespace ts {
/**
@@ -2763,8 +2997,8 @@ declare namespace ts {
function updateDecorator(node: Decorator, expression: Expression): Decorator;
function createPropertySignature(modifiers: Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
function updatePropertySignature(node: PropertySignature, modifiers: Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression): PropertyDeclaration;
function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression): PropertyDeclaration;
function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
function createMethodSignature(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
function updateMethodSignature(node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
function createMethod(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
@@ -2942,8 +3176,8 @@ declare namespace ts {
function updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
function createImportDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier?: Expression): ImportDeclaration;
function updateImportDeclaration(node: ImportDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression | undefined): ImportDeclaration;
function createImportClause(name: Identifier, namedBindings: NamedImportBindings): ImportClause;
function updateImportClause(node: ImportClause, name: Identifier, namedBindings: NamedImportBindings): ImportClause;
function createImportClause(name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
function updateImportClause(node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
function createNamespaceImport(name: Identifier): NamespaceImport;
function updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
function createNamedImports(elements: ImportSpecifier[]): NamedImports;
@@ -3018,6 +3252,8 @@ declare namespace ts {
function updateCommaList(node: CommaListExpression, elements: Expression[]): CommaListExpression;
function createBundle(sourceFiles: SourceFile[]): Bundle;
function updateBundle(node: Bundle, sourceFiles: SourceFile[]): Bundle;
function createImmediatelyInvokedFunctionExpression(statements: Statement[]): CallExpression;
function createImmediatelyInvokedFunctionExpression(statements: Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
function createComma(left: Expression, right: Expression): Expression;
function createLessThan(left: Expression, right: Expression): Expression;
function createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
@@ -3109,7 +3345,17 @@ declare namespace ts {
}
declare namespace ts {
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
function forEachChild<T>(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T | undefined;
/**
* Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
* stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
* embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
* a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
*
* @param node a given node to visit its children
* @param cbNode a callback to be invoked for all child nodes
* @param cbNodeArray a callback to be invoked for embedded array
*/
function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile;
function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName;
function isExternalModule(file: SourceFile): boolean;
@@ -3256,6 +3502,19 @@ declare namespace ts {
function formatDiagnostics(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
function formatDiagnosticsWithColorAndContext(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
/**
* Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
* that represent a compilation unit.
*
* Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
* triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
*
* @param rootNames - A set of root files.
* @param options - The compiler options which should be used.
* @param host - The host interacts with the underlying file system.
* @param oldProgram - Reuses an old program structure.
* @returns A 'Program' object.
*/
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program;
}
declare namespace ts {
@@ -3312,31 +3571,31 @@ declare namespace ts {
getText(sourceFile?: SourceFile): string;
getFirstToken(sourceFile?: SourceFile): Node;
getLastToken(sourceFile?: SourceFile): Node;
forEachChild<T>(cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T;
forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
}
interface Symbol {
getFlags(): SymbolFlags;
getName(): string;
getDeclarations(): Declaration[];
getDeclarations(): Declaration[] | undefined;
getDocumentationComment(): SymbolDisplayPart[];
getJsDocTags(): JSDocTagInfo[];
}
interface Type {
getFlags(): TypeFlags;
getSymbol(): Symbol;
getSymbol(): Symbol | undefined;
getProperties(): Symbol[];
getProperty(propertyName: string): Symbol;
getProperty(propertyName: string): Symbol | undefined;
getApparentProperties(): Symbol[];
getCallSignatures(): Signature[];
getConstructSignatures(): Signature[];
getStringIndexType(): Type;
getNumberIndexType(): Type;
getBaseTypes(): BaseType[];
getStringIndexType(): Type | undefined;
getNumberIndexType(): Type | undefined;
getBaseTypes(): BaseType[] | undefined;
getNonNullableType(): Type;
}
interface Signature {
getDeclaration(): SignatureDeclaration;
getTypeParameters(): TypeParameter[];
getTypeParameters(): TypeParameter[] | undefined;
getParameters(): Symbol[];
getReturnType(): Type;
getDocumentationComment(): SymbolDisplayPart[];
@@ -3472,7 +3731,7 @@ declare namespace ts {
}
interface ClassifiedSpan {
textSpan: TextSpan;
classificationType: string;
classificationType: ClassificationTypeNames;
}
/**
* Navigation bar interface designed for visual studio's dual-column layout.
@@ -3482,7 +3741,7 @@ declare namespace ts {
*/
interface NavigationBarItem {
text: string;
kind: string;
kind: ScriptElementKind;
kindModifiers: string;
spans: TextSpan[];
childItems: NavigationBarItem[];
@@ -3497,8 +3756,7 @@ declare namespace ts {
interface NavigationTree {
/** Name of the declaration, or a short description, e.g. "<class>". */
text: string;
/** A ScriptElementKind */
kind: string;
kind: ScriptElementKind;
/** ScriptElementKindModifier separated by commas, e.g. "public,abstract" */
kindModifiers: string;
/**
@@ -3553,35 +3811,35 @@ declare namespace ts {
isInString?: true;
}
interface ImplementationLocation extends DocumentSpan {
kind: string;
kind: ScriptElementKind;
displayParts: SymbolDisplayPart[];
}
interface DocumentHighlights {
fileName: string;
highlightSpans: HighlightSpan[];
}
namespace HighlightSpanKind {
const none = "none";
const definition = "definition";
const reference = "reference";
const writtenReference = "writtenReference";
enum HighlightSpanKind {
none = "none",
definition = "definition",
reference = "reference",
writtenReference = "writtenReference",
}
interface HighlightSpan {
fileName?: string;
isInString?: true;
textSpan: TextSpan;
kind: string;
kind: HighlightSpanKind;
}
interface NavigateToItem {
name: string;
kind: string;
kind: ScriptElementKind;
kindModifiers: string;
matchKind: string;
isCaseSensitive: boolean;
fileName: string;
textSpan: TextSpan;
containerName: string;
containerKind: string;
containerKind: ScriptElementKind;
}
enum IndentStyle {
None = 0,
@@ -3641,9 +3899,9 @@ declare namespace ts {
interface DefinitionInfo {
fileName: string;
textSpan: TextSpan;
kind: string;
kind: ScriptElementKind;
name: string;
containerKind: string;
containerKind: ScriptElementKind;
containerName: string;
}
interface ReferencedSymbolDefinitionInfo extends DefinitionInfo {
@@ -3686,7 +3944,7 @@ declare namespace ts {
text?: string;
}
interface QuickInfo {
kind: string;
kind: ScriptElementKind;
kindModifiers: string;
textSpan: TextSpan;
displayParts: SymbolDisplayPart[];
@@ -3698,7 +3956,7 @@ declare namespace ts {
localizedErrorMessage: string;
displayName: string;
fullDisplayName: string;
kind: string;
kind: ScriptElementKind;
kindModifiers: string;
triggerSpan: TextSpan;
}
@@ -3745,7 +4003,7 @@ declare namespace ts {
}
interface CompletionEntry {
name: string;
kind: string;
kind: ScriptElementKind;
kindModifiers: string;
sortText: string;
/**
@@ -3757,7 +4015,7 @@ declare namespace ts {
}
interface CompletionEntryDetails {
name: string;
kind: string;
kind: ScriptElementKind;
kindModifiers: string;
displayParts: SymbolDisplayPart[];
documentation: SymbolDisplayPart[];
@@ -3842,107 +4100,107 @@ declare namespace ts {
getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult;
getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications;
}
namespace ScriptElementKind {
const unknown = "";
const warning = "warning";
enum ScriptElementKind {
unknown = "",
warning = "warning",
/** predefined type (void) or keyword (class) */
const keyword = "keyword";
keyword = "keyword",
/** top level script node */
const scriptElement = "script";
scriptElement = "script",
/** module foo {} */
const moduleElement = "module";
moduleElement = "module",
/** class X {} */
const classElement = "class";
classElement = "class",
/** var x = class X {} */
const localClassElement = "local class";
localClassElement = "local class",
/** interface Y {} */
const interfaceElement = "interface";
interfaceElement = "interface",
/** type T = ... */
const typeElement = "type";
typeElement = "type",
/** enum E */
const enumElement = "enum";
const enumMemberElement = "enum member";
enumElement = "enum",
enumMemberElement = "enum member",
/**
* Inside module and script only
* const v = ..
*/
const variableElement = "var";
variableElement = "var",
/** Inside function */
const localVariableElement = "local var";
localVariableElement = "local var",
/**
* Inside module and script only
* function f() { }
*/
const functionElement = "function";
functionElement = "function",
/** Inside function */
const localFunctionElement = "local function";
localFunctionElement = "local function",
/** class X { [public|private]* foo() {} } */
const memberFunctionElement = "method";
memberFunctionElement = "method",
/** class X { [public|private]* [get|set] foo:number; } */
const memberGetAccessorElement = "getter";
const memberSetAccessorElement = "setter";
memberGetAccessorElement = "getter",
memberSetAccessorElement = "setter",
/**
* class X { [public|private]* foo:number; }
* interface Y { foo:number; }
*/
const memberVariableElement = "property";
memberVariableElement = "property",
/** class X { constructor() { } } */
const constructorImplementationElement = "constructor";
constructorImplementationElement = "constructor",
/** interface Y { ():number; } */
const callSignatureElement = "call";
callSignatureElement = "call",
/** interface Y { []:number; } */
const indexSignatureElement = "index";
indexSignatureElement = "index",
/** interface Y { new():Y; } */
const constructSignatureElement = "construct";
constructSignatureElement = "construct",
/** function foo(*Y*: string) */
const parameterElement = "parameter";
const typeParameterElement = "type parameter";
const primitiveType = "primitive type";
const label = "label";
const alias = "alias";
const constElement = "const";
const letElement = "let";
const directory = "directory";
const externalModuleName = "external module name";
parameterElement = "parameter",
typeParameterElement = "type parameter",
primitiveType = "primitive type",
label = "label",
alias = "alias",
constElement = "const",
letElement = "let",
directory = "directory",
externalModuleName = "external module name",
/**
* <JsxTagName attribute1 attribute2={0} />
*/
const jsxAttribute = "JSX attribute";
jsxAttribute = "JSX attribute",
}
namespace ScriptElementKindModifier {
const none = "";
const publicMemberModifier = "public";
const privateMemberModifier = "private";
const protectedMemberModifier = "protected";
const exportedModifier = "export";
const ambientModifier = "declare";
const staticModifier = "static";
const abstractModifier = "abstract";
enum ScriptElementKindModifier {
none = "",
publicMemberModifier = "public",
privateMemberModifier = "private",
protectedMemberModifier = "protected",
exportedModifier = "export",
ambientModifier = "declare",
staticModifier = "static",
abstractModifier = "abstract",
}
class ClassificationTypeNames {
static comment: string;
static identifier: string;
static keyword: string;
static numericLiteral: string;
static operator: string;
static stringLiteral: string;
static whiteSpace: string;
static text: string;
static punctuation: string;
static className: string;
static enumName: string;
static interfaceName: string;
static moduleName: string;
static typeParameterName: string;
static typeAliasName: string;
static parameterName: string;
static docCommentTagName: string;
static jsxOpenTagName: string;
static jsxCloseTagName: string;
static jsxSelfClosingTagName: string;
static jsxAttribute: string;
static jsxText: string;
static jsxAttributeStringLiteralValue: string;
enum ClassificationTypeNames {
comment = "comment",
identifier = "identifier",
keyword = "keyword",
numericLiteral = "number",
operator = "operator",
stringLiteral = "string",
whiteSpace = "whitespace",
text = "text",
punctuation = "punctuation",
className = "class name",
enumName = "enum name",
interfaceName = "interface name",
moduleName = "module name",
typeParameterName = "type parameter name",
typeAliasName = "type alias name",
parameterName = "parameter name",
docCommentTagName = "doc comment tag name",
jsxOpenTagName = "jsx open tag name",
jsxCloseTagName = "jsx close tag name",
jsxSelfClosingTagName = "jsx self closing tag name",
jsxAttribute = "jsx attribute",
jsxText = "jsx text",
jsxAttributeStringLiteralValue = "jsx attribute string literal value",
}
enum ClassificationType {
comment = 1,
+3470 -1969
View File
File diff suppressed because it is too large Load Diff
+380 -122
View File
@@ -414,6 +414,7 @@ declare namespace ts {
JavaScriptFile = 65536,
ThisNodeOrAnySubNodesHasError = 131072,
HasAggregatedChildData = 262144,
PossiblyContainDynamicImport = 524288,
BlockScoped = 3,
ReachabilityCheckFlags = 384,
ReachabilityAndEmitFlags = 1408,
@@ -691,6 +692,7 @@ declare namespace ts {
interface ConstructorTypeNode extends TypeNode, SignatureDeclaration {
kind: SyntaxKind.ConstructorType;
}
type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference;
interface TypeReferenceNode extends TypeNode {
kind: SyntaxKind.TypeReference;
typeName: EntityName;
@@ -768,22 +770,24 @@ declare namespace ts {
interface UnaryExpression extends Expression {
_unaryExpressionBrand: any;
}
interface IncrementExpression extends UnaryExpression {
_incrementExpressionBrand: any;
/** Deprecated, please use UpdateExpression */
type IncrementExpression = UpdateExpression;
interface UpdateExpression extends UnaryExpression {
_updateExpressionBrand: any;
}
type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken;
interface PrefixUnaryExpression extends IncrementExpression {
interface PrefixUnaryExpression extends UpdateExpression {
kind: SyntaxKind.PrefixUnaryExpression;
operator: PrefixUnaryOperator;
operand: UnaryExpression;
}
type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
interface PostfixUnaryExpression extends IncrementExpression {
interface PostfixUnaryExpression extends UpdateExpression {
kind: SyntaxKind.PostfixUnaryExpression;
operand: LeftHandSideExpression;
operator: PostfixUnaryOperator;
}
interface LeftHandSideExpression extends IncrementExpression {
interface LeftHandSideExpression extends UpdateExpression {
_leftHandSideExpressionBrand: any;
}
interface MemberExpression extends LeftHandSideExpression {
@@ -804,6 +808,9 @@ declare namespace ts {
interface SuperExpression extends PrimaryExpression {
kind: SyntaxKind.SuperKeyword;
}
interface ImportExpression extends PrimaryExpression {
kind: SyntaxKind.ImportKeyword;
}
interface DeleteExpression extends UnaryExpression {
kind: SyntaxKind.DeleteExpression;
expression: UnaryExpression;
@@ -988,6 +995,9 @@ declare namespace ts {
interface SuperCall extends CallExpression {
expression: SuperExpression;
}
interface ImportCall extends CallExpression {
expression: ImportExpression;
}
interface ExpressionWithTypeArguments extends TypeNode {
kind: SyntaxKind.ExpressionWithTypeArguments;
parent?: HeritageClause;
@@ -1458,6 +1468,7 @@ declare namespace ts {
comment: string | undefined;
}
interface JSDocTag extends Node {
parent: JSDoc;
atToken: AtToken;
tagName: Identifier;
comment: string | undefined;
@@ -1482,6 +1493,7 @@ declare namespace ts {
typeExpression: JSDocTypeExpression;
}
interface JSDocTypedefTag extends JSDocTag, NamedDeclaration {
parent: JSDoc;
kind: SyntaxKind.JSDocTypedefTag;
fullName?: JSDocNamespaceDeclaration | Identifier;
name?: Identifier;
@@ -1489,9 +1501,15 @@ declare namespace ts {
jsDocTypeLiteral?: JSDocTypeLiteral;
}
interface JSDocPropertyTag extends JSDocTag, TypeElement {
parent: JSDoc;
kind: SyntaxKind.JSDocPropertyTag;
name: Identifier;
/** the parameter name, if provided *before* the type (TypeScript-style) */
preParameterName?: Identifier;
/** the parameter name, if provided *after* the type (JSDoc-standard) */
postParameterName?: Identifier;
typeExpression: JSDocTypeExpression;
isBracketed: boolean;
}
interface JSDocTypeLiteral extends JSDocType {
kind: SyntaxKind.JSDocTypeLiteral;
@@ -1506,7 +1524,7 @@ declare namespace ts {
/** the parameter name, if provided *after* the type (JSDoc-standard) */
postParameterName?: Identifier;
/** the parameter name, regardless of the location it was provided */
parameterName: Identifier;
name: Identifier;
isBracketed: boolean;
}
enum FlowFlags {
@@ -1704,10 +1722,10 @@ declare namespace ts {
getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
getDeclaredTypeOfSymbol(symbol: Symbol): Type;
getPropertiesOfType(type: Type): Symbol[];
getPropertyOfType(type: Type, propertyName: string): Symbol;
getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo;
getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined;
getSignaturesOfType(type: Type, kind: SignatureKind): Signature[];
getIndexTypeOfType(type: Type, kind: IndexKind): Type;
getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
getBaseTypes(type: InterfaceType): BaseType[];
getBaseTypeOfLiteralType(type: Type): Type;
getWidenedType(type: Type): Type;
@@ -1800,23 +1818,24 @@ declare namespace ts {
clear(): void;
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
reportInaccessibleThisError(): void;
reportIllegalExtends(): void;
reportPrivateInBaseOfClassExpression(propertyName: string): void;
}
enum TypeFormatFlags {
None = 0,
WriteArrayAsGenericType = 1,
UseTypeOfFunction = 2,
NoTruncation = 4,
WriteArrowStyleSignature = 8,
WriteOwnNameForAnyLike = 16,
WriteTypeArgumentsOfSignature = 32,
InElementType = 64,
UseFullyQualifiedType = 128,
InFirstTypeArgument = 256,
InTypeAlias = 512,
UseTypeAliasValue = 1024,
SuppressAnyReturnType = 2048,
AddUndefined = 4096,
UseTypeOfFunction = 4,
NoTruncation = 8,
WriteArrowStyleSignature = 16,
WriteOwnNameForAnyLike = 32,
WriteTypeArgumentsOfSignature = 64,
InElementType = 128,
UseFullyQualifiedType = 256,
InFirstTypeArgument = 512,
InTypeAlias = 1024,
UseTypeAliasValue = 2048,
SuppressAnyReturnType = 4096,
AddUndefined = 8192,
WriteClassExpressionAsTypeLiteral = 16384,
}
enum SymbolFormatFlags {
None = 0,
@@ -2062,6 +2081,24 @@ declare namespace ts {
isReadonly: boolean;
declaration?: SignatureDeclaration;
}
enum InferencePriority {
NakedTypeVariable = 1,
MappedType = 2,
ReturnType = 4,
}
interface InferenceInfo {
typeParameter: TypeParameter;
candidates: Type[];
inferredType: Type;
priority: InferencePriority;
topLevel: boolean;
isFixed: boolean;
}
enum InferenceFlags {
InferUnionTypes = 1,
NoDefault = 2,
AnyDefault = 4,
}
interface JsFileExtensionInfo {
extension: string;
isMixedContent: boolean;
@@ -2197,6 +2234,7 @@ declare namespace ts {
UMD = 3,
System = 4,
ES2015 = 5,
ESNext = 6,
}
enum JsxEmit {
None = 0,
@@ -2630,7 +2668,7 @@ declare namespace ts {
scanRange<T>(start: number, length: number, callback: () => T): T;
tryScan<T>(callback: () => T): T;
}
function tokenToString(t: SyntaxKind): string;
function tokenToString(t: SyntaxKind): string | undefined;
function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number;
function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter;
function isWhiteSpaceLike(ch: number): boolean;
@@ -2722,6 +2760,202 @@ declare namespace ts {
* @returns The unescaped identifier text.
*/
function unescapeIdentifier(identifier: string): string;
function getNameOfDeclaration(declaration: Declaration): DeclarationName | undefined;
}
declare namespace ts {
function isNumericLiteral(node: Node): node is NumericLiteral;
function isStringLiteral(node: Node): node is StringLiteral;
function isJsxText(node: Node): node is JsxText;
function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral;
function isNoSubstitutionTemplateLiteral(node: Node): node is LiteralExpression;
function isTemplateHead(node: Node): node is TemplateHead;
function isTemplateMiddle(node: Node): node is TemplateMiddle;
function isTemplateTail(node: Node): node is TemplateTail;
function isIdentifier(node: Node): node is Identifier;
function isQualifiedName(node: Node): node is QualifiedName;
function isComputedPropertyName(node: Node): node is ComputedPropertyName;
function isTypeParameter(node: Node): node is TypeParameterDeclaration;
function isParameter(node: Node): node is ParameterDeclaration;
function isDecorator(node: Node): node is Decorator;
function isPropertySignature(node: Node): node is PropertySignature;
function isPropertyDeclaration(node: Node): node is PropertyDeclaration;
function isMethodSignature(node: Node): node is MethodSignature;
function isMethodDeclaration(node: Node): node is MethodDeclaration;
function isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration;
function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration;
function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration;
function isTypePredicateNode(node: Node): node is TypePredicateNode;
function isTypeReferenceNode(node: Node): node is TypeReferenceNode;
function isFunctionTypeNode(node: Node): node is FunctionTypeNode;
function isConstructorTypeNode(node: Node): node is ConstructorTypeNode;
function isTypeQueryNode(node: Node): node is TypeQueryNode;
function isTypeLiteralNode(node: Node): node is TypeLiteralNode;
function isArrayTypeNode(node: Node): node is ArrayTypeNode;
function isTupleTypeNode(node: Node): node is TupleTypeNode;
function isUnionTypeNode(node: Node): node is UnionTypeNode;
function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode;
function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode;
function isThisTypeNode(node: Node): node is ThisTypeNode;
function isTypeOperatorNode(node: Node): node is TypeOperatorNode;
function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode;
function isMappedTypeNode(node: Node): node is MappedTypeNode;
function isLiteralTypeNode(node: Node): node is LiteralTypeNode;
function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
function isBindingElement(node: Node): node is BindingElement;
function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression;
function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression;
function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression;
function isElementAccessExpression(node: Node): node is ElementAccessExpression;
function isCallExpression(node: Node): node is CallExpression;
function isNewExpression(node: Node): node is NewExpression;
function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression;
function isTypeAssertion(node: Node): node is TypeAssertion;
function isParenthesizedExpression(node: Node): node is ParenthesizedExpression;
function isFunctionExpression(node: Node): node is FunctionExpression;
function isArrowFunction(node: Node): node is ArrowFunction;
function isDeleteExpression(node: Node): node is DeleteExpression;
function isTypeOfExpression(node: Node): node is TypeOfExpression;
function isVoidExpression(node: Node): node is VoidExpression;
function isAwaitExpression(node: Node): node is AwaitExpression;
function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression;
function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression;
function isBinaryExpression(node: Node): node is BinaryExpression;
function isConditionalExpression(node: Node): node is ConditionalExpression;
function isTemplateExpression(node: Node): node is TemplateExpression;
function isYieldExpression(node: Node): node is YieldExpression;
function isSpreadElement(node: Node): node is SpreadElement;
function isClassExpression(node: Node): node is ClassExpression;
function isOmittedExpression(node: Node): node is OmittedExpression;
function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments;
function isAsExpression(node: Node): node is AsExpression;
function isNonNullExpression(node: Node): node is NonNullExpression;
function isMetaProperty(node: Node): node is MetaProperty;
function isTemplateSpan(node: Node): node is TemplateSpan;
function isSemicolonClassElement(node: Node): node is SemicolonClassElement;
function isBlock(node: Node): node is Block;
function isVariableStatement(node: Node): node is VariableStatement;
function isEmptyStatement(node: Node): node is EmptyStatement;
function isExpressionStatement(node: Node): node is ExpressionStatement;
function isIfStatement(node: Node): node is IfStatement;
function isDoStatement(node: Node): node is DoStatement;
function isWhileStatement(node: Node): node is WhileStatement;
function isForStatement(node: Node): node is ForStatement;
function isForInStatement(node: Node): node is ForInStatement;
function isForOfStatement(node: Node): node is ForOfStatement;
function isContinueStatement(node: Node): node is ContinueStatement;
function isBreakStatement(node: Node): node is BreakStatement;
function isReturnStatement(node: Node): node is ReturnStatement;
function isWithStatement(node: Node): node is WithStatement;
function isSwitchStatement(node: Node): node is SwitchStatement;
function isLabeledStatement(node: Node): node is LabeledStatement;
function isThrowStatement(node: Node): node is ThrowStatement;
function isTryStatement(node: Node): node is TryStatement;
function isDebuggerStatement(node: Node): node is DebuggerStatement;
function isVariableDeclaration(node: Node): node is VariableDeclaration;
function isVariableDeclarationList(node: Node): node is VariableDeclarationList;
function isFunctionDeclaration(node: Node): node is FunctionDeclaration;
function isClassDeclaration(node: Node): node is ClassDeclaration;
function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration;
function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration;
function isEnumDeclaration(node: Node): node is EnumDeclaration;
function isModuleDeclaration(node: Node): node is ModuleDeclaration;
function isModuleBlock(node: Node): node is ModuleBlock;
function isCaseBlock(node: Node): node is CaseBlock;
function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration;
function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration;
function isImportDeclaration(node: Node): node is ImportDeclaration;
function isImportClause(node: Node): node is ImportClause;
function isNamespaceImport(node: Node): node is NamespaceImport;
function isNamedImports(node: Node): node is NamedImports;
function isImportSpecifier(node: Node): node is ImportSpecifier;
function isExportAssignment(node: Node): node is ExportAssignment;
function isExportDeclaration(node: Node): node is ExportDeclaration;
function isNamedExports(node: Node): node is NamedExports;
function isExportSpecifier(node: Node): node is ExportSpecifier;
function isMissingDeclaration(node: Node): node is MissingDeclaration;
function isExternalModuleReference(node: Node): node is ExternalModuleReference;
function isJsxElement(node: Node): node is JsxElement;
function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement;
function isJsxOpeningElement(node: Node): node is JsxOpeningElement;
function isJsxClosingElement(node: Node): node is JsxClosingElement;
function isJsxAttribute(node: Node): node is JsxAttribute;
function isJsxAttributes(node: Node): node is JsxAttributes;
function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
function isJsxExpression(node: Node): node is JsxExpression;
function isCaseClause(node: Node): node is CaseClause;
function isDefaultClause(node: Node): node is DefaultClause;
function isHeritageClause(node: Node): node is HeritageClause;
function isCatchClause(node: Node): node is CatchClause;
function isPropertyAssignment(node: Node): node is PropertyAssignment;
function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment;
function isSpreadAssignment(node: Node): node is SpreadAssignment;
function isEnumMember(node: Node): node is EnumMember;
function isSourceFile(node: Node): node is SourceFile;
function isBundle(node: Node): node is Bundle;
function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
function isJSDocAllType(node: JSDocAllType): node is JSDocAllType;
function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
function isJSDocArrayType(node: Node): node is JSDocArrayType;
function isJSDocUnionType(node: Node): node is JSDocUnionType;
function isJSDocTupleType(node: Node): node is JSDocTupleType;
function isJSDocNullableType(node: Node): node is JSDocNullableType;
function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType;
function isJSDocRecordType(node: Node): node is JSDocRecordType;
function isJSDocRecordMember(node: Node): node is JSDocRecordMember;
function isJSDocTypeReference(node: Node): node is JSDocTypeReference;
function isJSDocOptionalType(node: Node): node is JSDocOptionalType;
function isJSDocFunctionType(node: Node): node is JSDocFunctionType;
function isJSDocVariadicType(node: Node): node is JSDocVariadicType;
function isJSDocConstructorType(node: Node): node is JSDocConstructorType;
function isJSDocThisType(node: Node): node is JSDocThisType;
function isJSDoc(node: Node): node is JSDoc;
function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag;
function isJSDocParameterTag(node: Node): node is JSDocParameterTag;
function isJSDocReturnTag(node: Node): node is JSDocReturnTag;
function isJSDocTypeTag(node: Node): node is JSDocTypeTag;
function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag;
function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag;
function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral;
function isJSDocLiteralType(node: Node): node is JSDocLiteralType;
}
declare namespace ts {
/**
* True if node is of some token syntax kind.
* For example, this is true for an IfKeyword but not for an IfStatement.
*/
function isToken(n: Node): boolean;
function isLiteralExpression(node: Node): node is LiteralExpression;
function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail;
function isModifier(node: Node): node is Modifier;
function isEntityName(node: Node): node is EntityName;
function isPropertyName(node: Node): node is PropertyName;
function isBindingName(node: Node): node is BindingName;
function isFunctionLike(node: Node): node is FunctionLikeDeclaration;
function isClassElement(node: Node): node is ClassElement;
function isClassLike(node: Node): node is ClassLikeDeclaration;
function isAccessor(node: Node): node is AccessorDeclaration;
function isTypeElement(node: Node): node is TypeElement;
function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike;
/**
* Node test that determines whether a node is a valid type node.
* This differs from the `isPartOfTypeNode` function which determines whether a node is *part*
* of a TypeNode.
*/
function isTypeNode(node: Node): node is TypeNode;
function isFunctionOrConstructorTypeNode(node: Node): node is FunctionTypeNode | ConstructorTypeNode;
function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName;
function isCallLikeExpression(node: Node): node is CallLikeExpression;
function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression;
function isTemplateLiteral(node: Node): node is TemplateLiteral;
function isAssertionExpression(node: Node): node is AssertionExpression;
function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement;
function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement;
function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause;
}
declare namespace ts {
/**
@@ -2763,8 +2997,8 @@ declare namespace ts {
function updateDecorator(node: Decorator, expression: Expression): Decorator;
function createPropertySignature(modifiers: Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
function updatePropertySignature(node: PropertySignature, modifiers: Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression): PropertyDeclaration;
function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression): PropertyDeclaration;
function createProperty(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
function updateProperty(node: PropertyDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: PropertyName, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
function createMethodSignature(typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
function updateMethodSignature(node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
function createMethod(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
@@ -2942,8 +3176,8 @@ declare namespace ts {
function updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
function createImportDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier?: Expression): ImportDeclaration;
function updateImportDeclaration(node: ImportDeclaration, decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression | undefined): ImportDeclaration;
function createImportClause(name: Identifier, namedBindings: NamedImportBindings): ImportClause;
function updateImportClause(node: ImportClause, name: Identifier, namedBindings: NamedImportBindings): ImportClause;
function createImportClause(name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
function updateImportClause(node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause;
function createNamespaceImport(name: Identifier): NamespaceImport;
function updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
function createNamedImports(elements: ImportSpecifier[]): NamedImports;
@@ -3018,6 +3252,8 @@ declare namespace ts {
function updateCommaList(node: CommaListExpression, elements: Expression[]): CommaListExpression;
function createBundle(sourceFiles: SourceFile[]): Bundle;
function updateBundle(node: Bundle, sourceFiles: SourceFile[]): Bundle;
function createImmediatelyInvokedFunctionExpression(statements: Statement[]): CallExpression;
function createImmediatelyInvokedFunctionExpression(statements: Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
function createComma(left: Expression, right: Expression): Expression;
function createLessThan(left: Expression, right: Expression): Expression;
function createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
@@ -3109,7 +3345,17 @@ declare namespace ts {
}
declare namespace ts {
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
function forEachChild<T>(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T | undefined;
/**
* Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
* stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
* embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
* a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
*
* @param node a given node to visit its children
* @param cbNode a callback to be invoked for all child nodes
* @param cbNodeArray a callback to be invoked for embedded array
*/
function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile;
function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName;
function isExternalModule(file: SourceFile): boolean;
@@ -3256,6 +3502,19 @@ declare namespace ts {
function formatDiagnostics(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
function formatDiagnosticsWithColorAndContext(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string;
function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string;
/**
* Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
* that represent a compilation unit.
*
* Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
* triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
*
* @param rootNames - A set of root files.
* @param options - The compiler options which should be used.
* @param host - The host interacts with the underlying file system.
* @param oldProgram - Reuses an old program structure.
* @returns A 'Program' object.
*/
function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program): Program;
}
declare namespace ts {
@@ -3312,31 +3571,31 @@ declare namespace ts {
getText(sourceFile?: SourceFile): string;
getFirstToken(sourceFile?: SourceFile): Node;
getLastToken(sourceFile?: SourceFile): Node;
forEachChild<T>(cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T;
forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
}
interface Symbol {
getFlags(): SymbolFlags;
getName(): string;
getDeclarations(): Declaration[];
getDeclarations(): Declaration[] | undefined;
getDocumentationComment(): SymbolDisplayPart[];
getJsDocTags(): JSDocTagInfo[];
}
interface Type {
getFlags(): TypeFlags;
getSymbol(): Symbol;
getSymbol(): Symbol | undefined;
getProperties(): Symbol[];
getProperty(propertyName: string): Symbol;
getProperty(propertyName: string): Symbol | undefined;
getApparentProperties(): Symbol[];
getCallSignatures(): Signature[];
getConstructSignatures(): Signature[];
getStringIndexType(): Type;
getNumberIndexType(): Type;
getBaseTypes(): BaseType[];
getStringIndexType(): Type | undefined;
getNumberIndexType(): Type | undefined;
getBaseTypes(): BaseType[] | undefined;
getNonNullableType(): Type;
}
interface Signature {
getDeclaration(): SignatureDeclaration;
getTypeParameters(): TypeParameter[];
getTypeParameters(): TypeParameter[] | undefined;
getParameters(): Symbol[];
getReturnType(): Type;
getDocumentationComment(): SymbolDisplayPart[];
@@ -3472,7 +3731,7 @@ declare namespace ts {
}
interface ClassifiedSpan {
textSpan: TextSpan;
classificationType: string;
classificationType: ClassificationTypeNames;
}
/**
* Navigation bar interface designed for visual studio's dual-column layout.
@@ -3482,7 +3741,7 @@ declare namespace ts {
*/
interface NavigationBarItem {
text: string;
kind: string;
kind: ScriptElementKind;
kindModifiers: string;
spans: TextSpan[];
childItems: NavigationBarItem[];
@@ -3497,8 +3756,7 @@ declare namespace ts {
interface NavigationTree {
/** Name of the declaration, or a short description, e.g. "<class>". */
text: string;
/** A ScriptElementKind */
kind: string;
kind: ScriptElementKind;
/** ScriptElementKindModifier separated by commas, e.g. "public,abstract" */
kindModifiers: string;
/**
@@ -3553,35 +3811,35 @@ declare namespace ts {
isInString?: true;
}
interface ImplementationLocation extends DocumentSpan {
kind: string;
kind: ScriptElementKind;
displayParts: SymbolDisplayPart[];
}
interface DocumentHighlights {
fileName: string;
highlightSpans: HighlightSpan[];
}
namespace HighlightSpanKind {
const none = "none";
const definition = "definition";
const reference = "reference";
const writtenReference = "writtenReference";
enum HighlightSpanKind {
none = "none",
definition = "definition",
reference = "reference",
writtenReference = "writtenReference",
}
interface HighlightSpan {
fileName?: string;
isInString?: true;
textSpan: TextSpan;
kind: string;
kind: HighlightSpanKind;
}
interface NavigateToItem {
name: string;
kind: string;
kind: ScriptElementKind;
kindModifiers: string;
matchKind: string;
isCaseSensitive: boolean;
fileName: string;
textSpan: TextSpan;
containerName: string;
containerKind: string;
containerKind: ScriptElementKind;
}
enum IndentStyle {
None = 0,
@@ -3641,9 +3899,9 @@ declare namespace ts {
interface DefinitionInfo {
fileName: string;
textSpan: TextSpan;
kind: string;
kind: ScriptElementKind;
name: string;
containerKind: string;
containerKind: ScriptElementKind;
containerName: string;
}
interface ReferencedSymbolDefinitionInfo extends DefinitionInfo {
@@ -3686,7 +3944,7 @@ declare namespace ts {
text?: string;
}
interface QuickInfo {
kind: string;
kind: ScriptElementKind;
kindModifiers: string;
textSpan: TextSpan;
displayParts: SymbolDisplayPart[];
@@ -3698,7 +3956,7 @@ declare namespace ts {
localizedErrorMessage: string;
displayName: string;
fullDisplayName: string;
kind: string;
kind: ScriptElementKind;
kindModifiers: string;
triggerSpan: TextSpan;
}
@@ -3745,7 +4003,7 @@ declare namespace ts {
}
interface CompletionEntry {
name: string;
kind: string;
kind: ScriptElementKind;
kindModifiers: string;
sortText: string;
/**
@@ -3757,7 +4015,7 @@ declare namespace ts {
}
interface CompletionEntryDetails {
name: string;
kind: string;
kind: ScriptElementKind;
kindModifiers: string;
displayParts: SymbolDisplayPart[];
documentation: SymbolDisplayPart[];
@@ -3842,107 +4100,107 @@ declare namespace ts {
getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult;
getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications;
}
namespace ScriptElementKind {
const unknown = "";
const warning = "warning";
enum ScriptElementKind {
unknown = "",
warning = "warning",
/** predefined type (void) or keyword (class) */
const keyword = "keyword";
keyword = "keyword",
/** top level script node */
const scriptElement = "script";
scriptElement = "script",
/** module foo {} */
const moduleElement = "module";
moduleElement = "module",
/** class X {} */
const classElement = "class";
classElement = "class",
/** var x = class X {} */
const localClassElement = "local class";
localClassElement = "local class",
/** interface Y {} */
const interfaceElement = "interface";
interfaceElement = "interface",
/** type T = ... */
const typeElement = "type";
typeElement = "type",
/** enum E */
const enumElement = "enum";
const enumMemberElement = "enum member";
enumElement = "enum",
enumMemberElement = "enum member",
/**
* Inside module and script only
* const v = ..
*/
const variableElement = "var";
variableElement = "var",
/** Inside function */
const localVariableElement = "local var";
localVariableElement = "local var",
/**
* Inside module and script only
* function f() { }
*/
const functionElement = "function";
functionElement = "function",
/** Inside function */
const localFunctionElement = "local function";
localFunctionElement = "local function",
/** class X { [public|private]* foo() {} } */
const memberFunctionElement = "method";
memberFunctionElement = "method",
/** class X { [public|private]* [get|set] foo:number; } */
const memberGetAccessorElement = "getter";
const memberSetAccessorElement = "setter";
memberGetAccessorElement = "getter",
memberSetAccessorElement = "setter",
/**
* class X { [public|private]* foo:number; }
* interface Y { foo:number; }
*/
const memberVariableElement = "property";
memberVariableElement = "property",
/** class X { constructor() { } } */
const constructorImplementationElement = "constructor";
constructorImplementationElement = "constructor",
/** interface Y { ():number; } */
const callSignatureElement = "call";
callSignatureElement = "call",
/** interface Y { []:number; } */
const indexSignatureElement = "index";
indexSignatureElement = "index",
/** interface Y { new():Y; } */
const constructSignatureElement = "construct";
constructSignatureElement = "construct",
/** function foo(*Y*: string) */
const parameterElement = "parameter";
const typeParameterElement = "type parameter";
const primitiveType = "primitive type";
const label = "label";
const alias = "alias";
const constElement = "const";
const letElement = "let";
const directory = "directory";
const externalModuleName = "external module name";
parameterElement = "parameter",
typeParameterElement = "type parameter",
primitiveType = "primitive type",
label = "label",
alias = "alias",
constElement = "const",
letElement = "let",
directory = "directory",
externalModuleName = "external module name",
/**
* <JsxTagName attribute1 attribute2={0} />
*/
const jsxAttribute = "JSX attribute";
jsxAttribute = "JSX attribute",
}
namespace ScriptElementKindModifier {
const none = "";
const publicMemberModifier = "public";
const privateMemberModifier = "private";
const protectedMemberModifier = "protected";
const exportedModifier = "export";
const ambientModifier = "declare";
const staticModifier = "static";
const abstractModifier = "abstract";
enum ScriptElementKindModifier {
none = "",
publicMemberModifier = "public",
privateMemberModifier = "private",
protectedMemberModifier = "protected",
exportedModifier = "export",
ambientModifier = "declare",
staticModifier = "static",
abstractModifier = "abstract",
}
class ClassificationTypeNames {
static comment: string;
static identifier: string;
static keyword: string;
static numericLiteral: string;
static operator: string;
static stringLiteral: string;
static whiteSpace: string;
static text: string;
static punctuation: string;
static className: string;
static enumName: string;
static interfaceName: string;
static moduleName: string;
static typeParameterName: string;
static typeAliasName: string;
static parameterName: string;
static docCommentTagName: string;
static jsxOpenTagName: string;
static jsxCloseTagName: string;
static jsxSelfClosingTagName: string;
static jsxAttribute: string;
static jsxText: string;
static jsxAttributeStringLiteralValue: string;
enum ClassificationTypeNames {
comment = "comment",
identifier = "identifier",
keyword = "keyword",
numericLiteral = "number",
operator = "operator",
stringLiteral = "string",
whiteSpace = "whitespace",
text = "text",
punctuation = "punctuation",
className = "class name",
enumName = "enum name",
interfaceName = "interface name",
moduleName = "module name",
typeParameterName = "type parameter name",
typeAliasName = "type alias name",
parameterName = "parameter name",
docCommentTagName = "doc comment tag name",
jsxOpenTagName = "jsx open tag name",
jsxCloseTagName = "jsx close tag name",
jsxSelfClosingTagName = "jsx self closing tag name",
jsxAttribute = "jsx attribute",
jsxText = "jsx text",
jsxAttributeStringLiteralValue = "jsx attribute string literal value",
}
enum ClassificationType {
comment = 1,
+3470 -1969
View File
File diff suppressed because it is too large Load Diff
+191 -1042
View File
File diff suppressed because it is too large Load Diff