node_modules

This commit is contained in:
Florian Dold 2016-11-27 22:08:28 +01:00
parent b7f4ecc76a
commit f72af162a0
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
19 changed files with 27661 additions and 24337 deletions

2
node_modules/.yarn-integrity generated vendored
View File

@ -1 +1 @@
71a595d8819c141a8c9cb0787566aceeaaefb2b47317b30f3c9fbbfa9a25eb49
7ed29847ffe108e16d5c053f27c2c2be64cd4091dc26a19a2d6cfb0f78807183

View File

@ -177,7 +177,7 @@ for (const i in libraryTargets) {
const configureNightlyJs = path.join(scriptsDirectory, "configureNightly.js");
const configureNightlyTs = path.join(scriptsDirectory, "configureNightly.ts");
const packageJson = "package.json";
const programTs = path.join(compilerDirectory, "program.ts");
const versionFile = path.join(compilerDirectory, "core.ts");
function needsUpdate(source: string | string[], dest: string | string[]): boolean {
if (typeof source === "string" && typeof dest === "string") {
@ -285,7 +285,7 @@ gulp.task(configureNightlyJs, false, [], () => {
// Nightly management tasks
gulp.task("configure-nightly", "Runs scripts/configureNightly.ts to prepare a build for nightly publishing", [configureNightlyJs], (done) => {
exec(host, [configureNightlyJs, packageJson, programTs], done, done);
exec(host, [configureNightlyJs, packageJson, versionFile], done, done);
});
gulp.task("publish-nightly", "Runs `npm publish --tag next` to create a new nightly build on npm", ["LKG"], () => {
return runSequence("clean", "useDebugMode", "runtests", (done) => {

4328
node_modules/typescript/lib/lib.d.ts generated vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -225,13 +225,13 @@ interface NumberConstructor {
* number. Only finite values of the type number, result in true.
* @param number A numeric value.
*/
isFinite(value: any): value is number;
isFinite(number: number): boolean;
/**
* Returns true if the value passed is an integer, false otherwise.
* @param number A numeric value.
*/
isInteger(value: any): value is number;
isInteger(number: number): boolean;
/**
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
@ -239,13 +239,13 @@ interface NumberConstructor {
* to a number. Only values of the type number, that are also NaN, result in true.
* @param number A numeric value.
*/
isNaN(value: any): value is number;
isNaN(number: number): boolean;
/**
* Returns true if the value passed is a safe integer.
* @param number A numeric value.
*/
isSafeInteger(value: any): value is number;
isSafeInteger(number: number): boolean;
/**
* The value of the largest integer n such that n and n + 1 are both exactly representable as

View File

@ -200,7 +200,19 @@ interface ObjectConstructor {
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
* @param o Object on which to lock the attributes.
*/
freeze<T>(o: T): T;
freeze<T>(a: T[]): ReadonlyArray<T>;
/**
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
* @param o Object on which to lock the attributes.
*/
freeze<T extends Function>(f: T): T;
/**
* Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
* @param o Object on which to lock the attributes.
*/
freeze<T>(o: T): Readonly<T>;
/**
* Prevents the addition of new properties to an object.
@ -1363,6 +1375,34 @@ interface ArrayLike<T> {
readonly [n: number]: T;
}
/**
* Make all properties in T optional
*/
type Partial<T> = {
[P in keyof T]?: T[P];
};
/**
* Make all properties in T readonly
*/
type Readonly<T> = {
readonly [P in keyof T]: T[P];
};
/**
* From T pick a set of properties K
*/
type Pick<T, K extends keyof T> = {
[P in K]: T[P];
}
/**
* Construct a type with a set of properties K of type T
*/
type Record<K extends string, T> = {
[P in K]: T;
}
/**
* Represents a raw buffer of binary data, which is used to store data for the
* different typed arrays. ArrayBuffers cannot be read from or written to directly,

File diff suppressed because it is too large Load Diff

View File

@ -28,6 +28,7 @@ interface Algorithm {
}
interface EventInit {
scoped?: boolean;
bubbles?: boolean;
cancelable?: boolean;
}
@ -262,10 +263,12 @@ interface Event {
readonly target: EventTarget;
readonly timeStamp: number;
readonly type: string;
readonly scoped: boolean;
initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
preventDefault(): void;
stopImmediatePropagation(): void;
stopPropagation(): void;
deepPath(): EventTarget[];
readonly AT_TARGET: number;
readonly BUBBLING_PHASE: number;
readonly CAPTURING_PHASE: number;
@ -318,6 +321,7 @@ interface FileReader extends EventTarget, MSBaseReader {
readAsBinaryString(blob: Blob): void;
readAsDataURL(blob: Blob): void;
readAsText(blob: Blob, encoding?: string): void;
addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -359,11 +363,16 @@ declare var IDBCursorWithValue: {
new(): IDBCursorWithValue;
}
interface IDBDatabaseEventMap {
"abort": Event;
"error": ErrorEvent;
}
interface IDBDatabase extends EventTarget {
readonly name: string;
readonly objectStoreNames: DOMStringList;
onabort: (this: this, ev: Event) => any;
onerror: (this: this, ev: ErrorEvent) => any;
onabort: (this: IDBDatabase, ev: Event) => any;
onerror: (this: IDBDatabase, ev: ErrorEvent) => any;
version: number;
onversionchange: (ev: IDBVersionChangeEvent) => any;
close(): void;
@ -371,8 +380,7 @@ interface IDBDatabase extends EventTarget {
deleteObjectStore(name: string): void;
transaction(storeNames: string | string[], mode?: string): IDBTransaction;
addEventListener(type: "versionchange", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
addEventListener(type: "abort", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => 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;
}
@ -449,13 +457,15 @@ declare var IDBObjectStore: {
new(): IDBObjectStore;
}
interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
"blocked": Event;
"upgradeneeded": IDBVersionChangeEvent;
}
interface IDBOpenDBRequest extends IDBRequest {
onblocked: (this: this, ev: Event) => any;
onupgradeneeded: (this: this, ev: IDBVersionChangeEvent) => any;
addEventListener(type: "blocked", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: "success", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "upgradeneeded", listener: (this: this, ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
onblocked: (this: IDBOpenDBRequest, ev: Event) => any;
onupgradeneeded: (this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any;
addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -464,16 +474,20 @@ declare var IDBOpenDBRequest: {
new(): IDBOpenDBRequest;
}
interface IDBRequestEventMap {
"error": ErrorEvent;
"success": Event;
}
interface IDBRequest extends EventTarget {
readonly error: DOMError;
onerror: (this: this, ev: ErrorEvent) => any;
onsuccess: (this: this, ev: Event) => any;
onerror: (this: IDBRequest, ev: ErrorEvent) => any;
onsuccess: (this: IDBRequest, ev: Event) => any;
readonly readyState: string;
readonly result: any;
source: IDBObjectStore | IDBIndex | IDBCursor;
readonly transaction: IDBTransaction;
addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: "success", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -482,21 +496,25 @@ declare var IDBRequest: {
new(): IDBRequest;
}
interface IDBTransactionEventMap {
"abort": Event;
"complete": Event;
"error": ErrorEvent;
}
interface IDBTransaction extends EventTarget {
readonly db: IDBDatabase;
readonly error: DOMError;
readonly mode: string;
onabort: (this: this, ev: Event) => any;
oncomplete: (this: this, ev: Event) => any;
onerror: (this: this, ev: ErrorEvent) => any;
onabort: (this: IDBTransaction, ev: Event) => any;
oncomplete: (this: IDBTransaction, ev: Event) => any;
onerror: (this: IDBTransaction, ev: ErrorEvent) => any;
abort(): void;
objectStore(name: string): IDBObjectStore;
readonly READ_ONLY: string;
readonly READ_WRITE: string;
readonly VERSION_CHANGE: string;
addEventListener(type: "abort", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "complete", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -553,18 +571,22 @@ interface MSApp {
}
declare var MSApp: MSApp;
interface MSAppAsyncOperationEventMap {
"complete": Event;
"error": ErrorEvent;
}
interface MSAppAsyncOperation extends EventTarget {
readonly error: DOMError;
oncomplete: (this: this, ev: Event) => any;
onerror: (this: this, ev: ErrorEvent) => any;
oncomplete: (this: MSAppAsyncOperation, ev: Event) => any;
onerror: (this: MSAppAsyncOperation, ev: ErrorEvent) => any;
readonly readyState: number;
readonly result: any;
start(): void;
readonly COMPLETED: number;
readonly ERROR: number;
readonly STARTED: number;
addEventListener(type: "complete", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener<K extends keyof MSAppAsyncOperationEventMap>(type: K, listener: (this: MSAppAsyncOperation, ev: MSAppAsyncOperationEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -604,6 +626,7 @@ interface MSStreamReader extends EventTarget, MSBaseReader {
readAsBlob(stream: MSStream, size?: number): void;
readAsDataURL(stream: MSStream, size?: number): void;
readAsText(stream: MSStream, encoding?: string, size?: number): void;
addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -647,12 +670,16 @@ declare var MessageEvent: {
new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
}
interface MessagePortEventMap {
"message": MessageEvent;
}
interface MessagePort extends EventTarget {
onmessage: (this: this, ev: MessageEvent) => any;
onmessage: (this: MessagePort, ev: MessageEvent) => any;
close(): void;
postMessage(message?: any, ports?: any): void;
start(): void;
addEventListener(type: "message", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;
addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -700,14 +727,21 @@ declare var ProgressEvent: {
new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
}
interface WebSocketEventMap {
"close": CloseEvent;
"error": ErrorEvent;
"message": MessageEvent;
"open": Event;
}
interface WebSocket extends EventTarget {
binaryType: string;
readonly bufferedAmount: number;
readonly extensions: string;
onclose: (this: this, ev: CloseEvent) => any;
onerror: (this: this, ev: ErrorEvent) => any;
onmessage: (this: this, ev: MessageEvent) => any;
onopen: (this: this, ev: Event) => any;
onclose: (this: WebSocket, ev: CloseEvent) => any;
onerror: (this: WebSocket, ev: ErrorEvent) => any;
onmessage: (this: WebSocket, ev: MessageEvent) => any;
onopen: (this: WebSocket, ev: Event) => any;
readonly protocol: string;
readonly readyState: number;
readonly url: string;
@ -717,10 +751,7 @@ interface WebSocket extends EventTarget {
readonly CLOSING: number;
readonly CONNECTING: number;
readonly OPEN: number;
addEventListener(type: "close", listener: (this: this, ev: CloseEvent) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: "message", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;
addEventListener(type: "open", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -733,12 +764,15 @@ declare var WebSocket: {
readonly OPEN: number;
}
interface WorkerEventMap extends AbstractWorkerEventMap {
"message": MessageEvent;
}
interface Worker extends EventTarget, AbstractWorker {
onmessage: (this: this, ev: MessageEvent) => any;
onmessage: (this: Worker, ev: MessageEvent) => any;
postMessage(message: any, ports?: any): void;
terminate(): void;
addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: "message", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;
addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -747,8 +781,12 @@ declare var Worker: {
new(stringUrl: string): Worker;
}
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
"readystatechange": Event;
}
interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
onreadystatechange: (this: this, ev: Event) => any;
onreadystatechange: (this: XMLHttpRequest, ev: Event) => any;
readonly readyState: number;
readonly response: any;
readonly responseText: string;
@ -775,14 +813,7 @@ interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
readonly LOADING: number;
readonly OPENED: number;
readonly UNSENT: number;
addEventListener(type: "abort", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "load", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "loadend", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "loadstart", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "readystatechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "timeout", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -798,6 +829,7 @@ declare var XMLHttpRequest: {
}
interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -806,31 +838,39 @@ declare var XMLHttpRequestUpload: {
new(): XMLHttpRequestUpload;
}
interface AbstractWorkerEventMap {
"error": ErrorEvent;
}
interface AbstractWorker {
onerror: (this: this, ev: ErrorEvent) => any;
addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
onerror: (this: AbstractWorker, ev: ErrorEvent) => any;
addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
interface MSBaseReaderEventMap {
"abort": Event;
"error": ErrorEvent;
"load": Event;
"loadend": ProgressEvent;
"loadstart": Event;
"progress": ProgressEvent;
}
interface MSBaseReader {
onabort: (this: this, ev: Event) => any;
onerror: (this: this, ev: ErrorEvent) => any;
onload: (this: this, ev: Event) => any;
onloadend: (this: this, ev: ProgressEvent) => any;
onloadstart: (this: this, ev: Event) => any;
onprogress: (this: this, ev: ProgressEvent) => any;
onabort: (this: MSBaseReader, ev: Event) => any;
onerror: (this: MSBaseReader, ev: ErrorEvent) => any;
onload: (this: MSBaseReader, ev: Event) => any;
onloadend: (this: MSBaseReader, ev: ProgressEvent) => any;
onloadstart: (this: MSBaseReader, ev: Event) => any;
onprogress: (this: MSBaseReader, ev: ProgressEvent) => any;
readonly readyState: number;
readonly result: any;
abort(): void;
readonly DONE: number;
readonly EMPTY: number;
readonly LOADING: number;
addEventListener(type: "abort", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "loadend", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -858,21 +898,25 @@ interface WindowConsole {
readonly console: Console;
}
interface XMLHttpRequestEventTargetEventMap {
"abort": Event;
"error": ErrorEvent;
"load": Event;
"loadend": ProgressEvent;
"loadstart": Event;
"progress": ProgressEvent;
"timeout": ProgressEvent;
}
interface XMLHttpRequestEventTarget {
onabort: (this: this, ev: Event) => any;
onerror: (this: this, ev: ErrorEvent) => any;
onload: (this: this, ev: Event) => any;
onloadend: (this: this, ev: ProgressEvent) => any;
onloadstart: (this: this, ev: Event) => any;
onprogress: (this: this, ev: ProgressEvent) => any;
ontimeout: (this: this, ev: ProgressEvent) => any;
addEventListener(type: "abort", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "loadend", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: "timeout", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
onabort: (this: XMLHttpRequestEventTarget, ev: Event) => any;
onerror: (this: XMLHttpRequestEventTarget, ev: ErrorEvent) => any;
onload: (this: XMLHttpRequestEventTarget, ev: Event) => any;
onloadend: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
onloadstart: (this: XMLHttpRequestEventTarget, ev: Event) => any;
onprogress: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
ontimeout: (this: XMLHttpRequestEventTarget, ev: ProgressEvent) => any;
addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -888,15 +932,18 @@ declare var FileReaderSync: {
new(): FileReaderSync;
}
interface WorkerGlobalScopeEventMap extends DedicatedWorkerGlobalScopeEventMap {
"error": ErrorEvent;
}
interface WorkerGlobalScope extends EventTarget, WorkerUtils, DedicatedWorkerGlobalScope, WindowConsole {
readonly location: WorkerLocation;
onerror: (this: this, ev: ErrorEvent) => any;
onerror: (this: WorkerGlobalScope, ev: ErrorEvent) => any;
readonly self: WorkerGlobalScope;
close(): void;
msWriteProfilerMark(profilerMarkName: string): void;
toString(): string;
addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: "message", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;
addEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -924,7 +971,6 @@ declare var WorkerLocation: {
interface WorkerNavigator extends Object, NavigatorID, NavigatorOnLine {
readonly hardwareConcurrency: number;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var WorkerNavigator: {
@ -932,10 +978,14 @@ declare var WorkerNavigator: {
new(): WorkerNavigator;
}
interface DedicatedWorkerGlobalScopeEventMap {
"message": MessageEvent;
}
interface DedicatedWorkerGlobalScope {
onmessage: (this: this, ev: MessageEvent) => any;
onmessage: (this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any;
postMessage(data: any): void;
addEventListener(type: "message", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;
addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@ -1196,7 +1246,6 @@ declare var self: WorkerGlobalScope;
declare function close(): void;
declare function msWriteProfilerMark(profilerMarkName: string): void;
declare function toString(): string;
declare function addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
declare function dispatchEvent(evt: Event): boolean;
declare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
declare var indexedDB: IDBFactory;
@ -1217,8 +1266,7 @@ declare function btoa(rawString: string): string;
declare var onmessage: (this: WorkerGlobalScope, ev: MessageEvent) => any;
declare function postMessage(data: any): void;
declare var console: Console;
declare function addEventListener(type: "error", listener: (this: WorkerGlobalScope, ev: ErrorEvent) => any, useCapture?: boolean): void;
declare function addEventListener(type: "message", listener: (this: WorkerGlobalScope, ev: MessageEvent) => any, useCapture?: boolean): void;
declare function addEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, useCapture?: boolean): void;
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
type AlgorithmIdentifier = string | Algorithm;
type IDBKeyPath = string;

View File

@ -680,9 +680,13 @@ declare namespace ts.server.protocol {
*/
options: ExternalProjectCompilerOptions;
/**
* Explicitly specified typing options for the project
* @deprecated typingOptions. Use typeAcquisition instead
*/
typingOptions?: TypingOptions;
typingOptions?: TypeAcquisition;
/**
* Explicitly specified type acquisition for the project
*/
typeAcquisition?: TypeAcquisition;
}
interface CompileOnSaveMixin {
/**
@ -1653,6 +1657,10 @@ declare namespace ts.server.protocol {
* true if install request succeeded, otherwise - false
*/
installSuccess: boolean;
/**
* version of typings installer
*/
typingsInstallerVersion: string;
}
interface NavBarResponse extends Response {
body?: NavigationBarItem[];
@ -1802,8 +1810,9 @@ declare namespace ts.server.protocol {
position: number;
}
interface TypingOptions {
interface TypeAcquisition {
enableAutoDiscovery?: boolean;
enable?: boolean;
include?: string[];
exclude?: string[];
[option: string]: string[] | boolean | undefined;

5505
node_modules/typescript/lib/tsc.js generated vendored

File diff suppressed because it is too large Load Diff

6495
node_modules/typescript/lib/tsserver.js generated vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -317,23 +317,25 @@ declare namespace ts {
JSDocThisType = 277,
JSDocComment = 278,
JSDocTag = 279,
JSDocParameterTag = 280,
JSDocReturnTag = 281,
JSDocTypeTag = 282,
JSDocTemplateTag = 283,
JSDocTypedefTag = 284,
JSDocPropertyTag = 285,
JSDocTypeLiteral = 286,
JSDocLiteralType = 287,
JSDocNullKeyword = 288,
JSDocUndefinedKeyword = 289,
JSDocNeverKeyword = 290,
SyntaxList = 291,
NotEmittedStatement = 292,
PartiallyEmittedExpression = 293,
MergeDeclarationMarker = 294,
EndOfDeclarationMarker = 295,
Count = 296,
JSDocAugmentsTag = 280,
JSDocParameterTag = 281,
JSDocReturnTag = 282,
JSDocTypeTag = 283,
JSDocTemplateTag = 284,
JSDocTypedefTag = 285,
JSDocPropertyTag = 286,
JSDocTypeLiteral = 287,
JSDocLiteralType = 288,
JSDocNullKeyword = 289,
JSDocUndefinedKeyword = 290,
JSDocNeverKeyword = 291,
SyntaxList = 292,
NotEmittedStatement = 293,
PartiallyEmittedExpression = 294,
MergeDeclarationMarker = 295,
EndOfDeclarationMarker = 296,
RawExpression = 297,
Count = 298,
FirstAssignment = 57,
LastAssignment = 69,
FirstCompoundAssignment = 58,
@ -360,9 +362,9 @@ declare namespace ts {
LastBinaryOperator = 69,
FirstNode = 141,
FirstJSDocNode = 262,
LastJSDocNode = 287,
LastJSDocNode = 288,
FirstJSDocTagNode = 278,
LastJSDocTagNode = 290,
LastJSDocTagNode = 291,
}
enum NodeFlags {
None = 0,
@ -464,14 +466,14 @@ declare namespace ts {
right: Identifier;
}
type EntityName = Identifier | QualifiedName;
type PropertyName = Identifier | LiteralExpression | ComputedPropertyName;
type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern;
type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName;
type DeclarationName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | BindingPattern;
interface Declaration extends Node {
_declarationBrand: any;
name?: DeclarationName;
}
interface DeclarationStatement extends Declaration, Statement {
name?: Identifier | LiteralExpression;
name?: Identifier | StringLiteral | NumericLiteral;
}
interface ComputedPropertyName extends Node {
kind: SyntaxKind.ComputedPropertyName;
@ -573,18 +575,16 @@ declare namespace ts {
interface PropertyLikeDeclaration extends Declaration {
name: PropertyName;
}
interface BindingPattern extends Node {
elements: NodeArray<BindingElement | ArrayBindingElement>;
}
interface ObjectBindingPattern extends BindingPattern {
interface ObjectBindingPattern extends Node {
kind: SyntaxKind.ObjectBindingPattern;
elements: NodeArray<BindingElement>;
}
type ArrayBindingElement = BindingElement | OmittedExpression;
interface ArrayBindingPattern extends BindingPattern {
interface ArrayBindingPattern extends Node {
kind: SyntaxKind.ArrayBindingPattern;
elements: NodeArray<ArrayBindingElement>;
}
type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
type ArrayBindingElement = BindingElement | OmittedExpression;
/**
* Several node kinds share function-like features such as a signature,
* a name, and a body. These nodes should extend FunctionLikeDeclaration.
@ -809,17 +809,25 @@ declare namespace ts {
operatorToken: BinaryOperatorToken;
right: Expression;
}
interface AssignmentExpression extends BinaryExpression {
type AssignmentOperatorToken = Token<AssignmentOperator>;
interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression {
left: LeftHandSideExpression;
operatorToken: Token<SyntaxKind.EqualsToken>;
operatorToken: TOperator;
}
interface ObjectDestructuringAssignment extends AssignmentExpression {
interface ObjectDestructuringAssignment extends AssignmentExpression<EqualsToken> {
left: ObjectLiteralExpression;
}
interface ArrayDestructuringAssignment extends AssignmentExpression {
interface ArrayDestructuringAssignment extends AssignmentExpression<EqualsToken> {
left: ArrayLiteralExpression;
}
type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment;
type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression<EqualsToken> | Identifier | PropertyAccessExpression | ElementAccessExpression;
type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment;
type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Expression;
type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression;
type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression;
type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression;
type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern;
interface ConditionalExpression extends Expression {
kind: SyntaxKind.ConditionalExpression;
condition: Expression;
@ -1180,7 +1188,7 @@ declare namespace ts {
type ModuleName = Identifier | StringLiteral;
interface ModuleDeclaration extends DeclarationStatement {
kind: SyntaxKind.ModuleDeclaration;
name: Identifier | LiteralExpression;
name: Identifier | StringLiteral;
body?: ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | Identifier;
}
interface NamespaceDeclaration extends ModuleDeclaration {
@ -1332,7 +1340,7 @@ declare namespace ts {
type JSDocTypeReferencingNode = JSDocThisType | JSDocConstructorType | JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType;
interface JSDocRecordMember extends PropertySignature {
kind: SyntaxKind.JSDocRecordMember;
name: Identifier | LiteralExpression;
name: Identifier | StringLiteral | NumericLiteral;
type?: JSDocType;
}
interface JSDoc extends Node {
@ -1348,6 +1356,10 @@ declare namespace ts {
interface JSDocUnknownTag extends JSDocTag {
kind: SyntaxKind.JSDocTag;
}
interface JSDocAugmentsTag extends JSDocTag {
kind: SyntaxKind.JSDocAugmentsTag;
typeExpression: JSDocTypeExpression;
}
interface JSDocTemplateTag extends JSDocTag {
kind: SyntaxKind.JSDocTemplateTag;
typeParameters: NodeArray<TypeParameterDeclaration>;
@ -1596,6 +1608,7 @@ declare namespace ts {
getJsxIntrinsicTagNames(): Symbol[];
isOptionalParameter(node: ParameterDeclaration): boolean;
getAmbientModules(): Symbol[];
tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
}
interface SymbolDisplayBuilder {
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
@ -1761,7 +1774,7 @@ declare namespace ts {
Literal = 480,
StringOrNumberLiteral = 96,
PossiblyFalsy = 7406,
StringLike = 34,
StringLike = 262178,
NumberLike = 340,
BooleanLike = 136,
EnumLike = 272,
@ -1845,7 +1858,7 @@ declare namespace ts {
}
interface IndexedAccessType extends Type {
objectType: Type;
indexType: TypeParameter;
indexType: Type;
}
enum SignatureKind {
Call = 0,
@ -1962,12 +1975,13 @@ declare namespace ts {
target?: ScriptTarget;
traceResolution?: boolean;
types?: string[];
/** Paths used to used to compute primary types search locations */
/** Paths used to compute primary types search locations */
typeRoots?: string[];
[option: string]: CompilerOptionsValue | undefined;
}
interface TypingOptions {
interface TypeAcquisition {
enableAutoDiscovery?: boolean;
enable?: boolean;
include?: string[];
exclude?: string[];
[option: string]: string[] | boolean | undefined;
@ -1977,7 +1991,7 @@ declare namespace ts {
projectRootPath: string;
safeListPath: string;
packageNameToTypingLocation: Map<string>;
typingOptions: TypingOptions;
typeAcquisition: TypeAcquisition;
compilerOptions: CompilerOptions;
unresolvedImports: ReadonlyArray<string>;
}
@ -2025,7 +2039,7 @@ declare namespace ts {
/** Either a parsed command line or a parsed tsconfig.json */
interface ParsedCommandLine {
options: CompilerOptions;
typingOptions?: TypingOptions;
typeAcquisition?: TypeAcquisition;
fileNames: string[];
raw?: any;
errors: Diagnostic[];
@ -2129,6 +2143,10 @@ declare namespace ts {
_children: Node[];
}
}
declare namespace ts {
/** The version of the TypeScript compiler release */
const version = "2.2.0-dev.20161127";
}
declare namespace ts {
type FileWatcherCallback = (fileName: string, removed?: boolean) => void;
type DirectoryWatcherCallback = (fileName: string) => void;
@ -2260,9 +2278,19 @@ declare namespace ts {
*/
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
function getTypeParameterOwner(d: Declaration): Declaration;
function isParameterPropertyDeclaration(node: ParameterDeclaration): boolean;
function isParameterPropertyDeclaration(node: Node): boolean;
function getCombinedModifierFlags(node: Node): ModifierFlags;
function getCombinedNodeFlags(node: Node): NodeFlags;
/**
* Checks to see if the locale is in the appropriate format,
* and if it is, attempts to set the appropriate language.
*/
function validateLocaleAndSetLanguage(locale: string, sys: {
getExecutingFilePath(): string;
resolvePath(path: string): string;
fileExists(fileName: string): boolean;
readFile(fileName: string): string;
}, errors?: Diagnostic[]): void;
}
declare namespace ts {
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
@ -2273,6 +2301,7 @@ declare namespace ts {
function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
}
declare namespace ts {
function moduleHasNonRelativeName(moduleName: string): boolean;
function getEffectiveTypeRoots(options: CompilerOptions, host: {
directoryExists?: (directoryName: string) => boolean;
getCurrentDirectory?: () => string;
@ -2297,8 +2326,6 @@ declare namespace ts {
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
}
declare namespace ts {
/** The version of the TypeScript compiler release */
const version = "2.2.0-dev.20161115";
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string;
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
@ -2343,8 +2370,8 @@ declare namespace ts {
options: CompilerOptions;
errors: Diagnostic[];
};
function convertTypingOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
options: TypingOptions;
function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
options: TypeAcquisition;
errors: Diagnostic[];
};
}
@ -2393,6 +2420,7 @@ declare namespace ts {
}
interface SourceFile {
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
getLineEndOfPosition(pos: number): number;
getLineStarts(): number[];
getPositionOfLineAndCharacter(line: number, character: number): number;
update(newText: string, textChangeRange: TextChangeRange): SourceFile;

File diff suppressed because it is too large Load Diff

View File

@ -317,23 +317,25 @@ declare namespace ts {
JSDocThisType = 277,
JSDocComment = 278,
JSDocTag = 279,
JSDocParameterTag = 280,
JSDocReturnTag = 281,
JSDocTypeTag = 282,
JSDocTemplateTag = 283,
JSDocTypedefTag = 284,
JSDocPropertyTag = 285,
JSDocTypeLiteral = 286,
JSDocLiteralType = 287,
JSDocNullKeyword = 288,
JSDocUndefinedKeyword = 289,
JSDocNeverKeyword = 290,
SyntaxList = 291,
NotEmittedStatement = 292,
PartiallyEmittedExpression = 293,
MergeDeclarationMarker = 294,
EndOfDeclarationMarker = 295,
Count = 296,
JSDocAugmentsTag = 280,
JSDocParameterTag = 281,
JSDocReturnTag = 282,
JSDocTypeTag = 283,
JSDocTemplateTag = 284,
JSDocTypedefTag = 285,
JSDocPropertyTag = 286,
JSDocTypeLiteral = 287,
JSDocLiteralType = 288,
JSDocNullKeyword = 289,
JSDocUndefinedKeyword = 290,
JSDocNeverKeyword = 291,
SyntaxList = 292,
NotEmittedStatement = 293,
PartiallyEmittedExpression = 294,
MergeDeclarationMarker = 295,
EndOfDeclarationMarker = 296,
RawExpression = 297,
Count = 298,
FirstAssignment = 57,
LastAssignment = 69,
FirstCompoundAssignment = 58,
@ -360,9 +362,9 @@ declare namespace ts {
LastBinaryOperator = 69,
FirstNode = 141,
FirstJSDocNode = 262,
LastJSDocNode = 287,
LastJSDocNode = 288,
FirstJSDocTagNode = 278,
LastJSDocTagNode = 290,
LastJSDocTagNode = 291,
}
enum NodeFlags {
None = 0,
@ -464,14 +466,14 @@ declare namespace ts {
right: Identifier;
}
type EntityName = Identifier | QualifiedName;
type PropertyName = Identifier | LiteralExpression | ComputedPropertyName;
type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern;
type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName;
type DeclarationName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | BindingPattern;
interface Declaration extends Node {
_declarationBrand: any;
name?: DeclarationName;
}
interface DeclarationStatement extends Declaration, Statement {
name?: Identifier | LiteralExpression;
name?: Identifier | StringLiteral | NumericLiteral;
}
interface ComputedPropertyName extends Node {
kind: SyntaxKind.ComputedPropertyName;
@ -573,18 +575,16 @@ declare namespace ts {
interface PropertyLikeDeclaration extends Declaration {
name: PropertyName;
}
interface BindingPattern extends Node {
elements: NodeArray<BindingElement | ArrayBindingElement>;
}
interface ObjectBindingPattern extends BindingPattern {
interface ObjectBindingPattern extends Node {
kind: SyntaxKind.ObjectBindingPattern;
elements: NodeArray<BindingElement>;
}
type ArrayBindingElement = BindingElement | OmittedExpression;
interface ArrayBindingPattern extends BindingPattern {
interface ArrayBindingPattern extends Node {
kind: SyntaxKind.ArrayBindingPattern;
elements: NodeArray<ArrayBindingElement>;
}
type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
type ArrayBindingElement = BindingElement | OmittedExpression;
/**
* Several node kinds share function-like features such as a signature,
* a name, and a body. These nodes should extend FunctionLikeDeclaration.
@ -809,17 +809,25 @@ declare namespace ts {
operatorToken: BinaryOperatorToken;
right: Expression;
}
interface AssignmentExpression extends BinaryExpression {
type AssignmentOperatorToken = Token<AssignmentOperator>;
interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression {
left: LeftHandSideExpression;
operatorToken: Token<SyntaxKind.EqualsToken>;
operatorToken: TOperator;
}
interface ObjectDestructuringAssignment extends AssignmentExpression {
interface ObjectDestructuringAssignment extends AssignmentExpression<EqualsToken> {
left: ObjectLiteralExpression;
}
interface ArrayDestructuringAssignment extends AssignmentExpression {
interface ArrayDestructuringAssignment extends AssignmentExpression<EqualsToken> {
left: ArrayLiteralExpression;
}
type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment;
type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression<EqualsToken> | Identifier | PropertyAccessExpression | ElementAccessExpression;
type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment;
type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Expression;
type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression;
type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression;
type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression;
type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern;
interface ConditionalExpression extends Expression {
kind: SyntaxKind.ConditionalExpression;
condition: Expression;
@ -1180,7 +1188,7 @@ declare namespace ts {
type ModuleName = Identifier | StringLiteral;
interface ModuleDeclaration extends DeclarationStatement {
kind: SyntaxKind.ModuleDeclaration;
name: Identifier | LiteralExpression;
name: Identifier | StringLiteral;
body?: ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | Identifier;
}
interface NamespaceDeclaration extends ModuleDeclaration {
@ -1332,7 +1340,7 @@ declare namespace ts {
type JSDocTypeReferencingNode = JSDocThisType | JSDocConstructorType | JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType;
interface JSDocRecordMember extends PropertySignature {
kind: SyntaxKind.JSDocRecordMember;
name: Identifier | LiteralExpression;
name: Identifier | StringLiteral | NumericLiteral;
type?: JSDocType;
}
interface JSDoc extends Node {
@ -1348,6 +1356,10 @@ declare namespace ts {
interface JSDocUnknownTag extends JSDocTag {
kind: SyntaxKind.JSDocTag;
}
interface JSDocAugmentsTag extends JSDocTag {
kind: SyntaxKind.JSDocAugmentsTag;
typeExpression: JSDocTypeExpression;
}
interface JSDocTemplateTag extends JSDocTag {
kind: SyntaxKind.JSDocTemplateTag;
typeParameters: NodeArray<TypeParameterDeclaration>;
@ -1596,6 +1608,7 @@ declare namespace ts {
getJsxIntrinsicTagNames(): Symbol[];
isOptionalParameter(node: ParameterDeclaration): boolean;
getAmbientModules(): Symbol[];
tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
}
interface SymbolDisplayBuilder {
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
@ -1761,7 +1774,7 @@ declare namespace ts {
Literal = 480,
StringOrNumberLiteral = 96,
PossiblyFalsy = 7406,
StringLike = 34,
StringLike = 262178,
NumberLike = 340,
BooleanLike = 136,
EnumLike = 272,
@ -1845,7 +1858,7 @@ declare namespace ts {
}
interface IndexedAccessType extends Type {
objectType: Type;
indexType: TypeParameter;
indexType: Type;
}
enum SignatureKind {
Call = 0,
@ -1962,12 +1975,13 @@ declare namespace ts {
target?: ScriptTarget;
traceResolution?: boolean;
types?: string[];
/** Paths used to used to compute primary types search locations */
/** Paths used to compute primary types search locations */
typeRoots?: string[];
[option: string]: CompilerOptionsValue | undefined;
}
interface TypingOptions {
interface TypeAcquisition {
enableAutoDiscovery?: boolean;
enable?: boolean;
include?: string[];
exclude?: string[];
[option: string]: string[] | boolean | undefined;
@ -1977,7 +1991,7 @@ declare namespace ts {
projectRootPath: string;
safeListPath: string;
packageNameToTypingLocation: Map<string>;
typingOptions: TypingOptions;
typeAcquisition: TypeAcquisition;
compilerOptions: CompilerOptions;
unresolvedImports: ReadonlyArray<string>;
}
@ -2025,7 +2039,7 @@ declare namespace ts {
/** Either a parsed command line or a parsed tsconfig.json */
interface ParsedCommandLine {
options: CompilerOptions;
typingOptions?: TypingOptions;
typeAcquisition?: TypeAcquisition;
fileNames: string[];
raw?: any;
errors: Diagnostic[];
@ -2129,6 +2143,10 @@ declare namespace ts {
_children: Node[];
}
}
declare namespace ts {
/** The version of the TypeScript compiler release */
const version = "2.2.0-dev.20161127";
}
declare namespace ts {
type FileWatcherCallback = (fileName: string, removed?: boolean) => void;
type DirectoryWatcherCallback = (fileName: string) => void;
@ -2260,9 +2278,19 @@ declare namespace ts {
*/
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
function getTypeParameterOwner(d: Declaration): Declaration;
function isParameterPropertyDeclaration(node: ParameterDeclaration): boolean;
function isParameterPropertyDeclaration(node: Node): boolean;
function getCombinedModifierFlags(node: Node): ModifierFlags;
function getCombinedNodeFlags(node: Node): NodeFlags;
/**
* Checks to see if the locale is in the appropriate format,
* and if it is, attempts to set the appropriate language.
*/
function validateLocaleAndSetLanguage(locale: string, sys: {
getExecutingFilePath(): string;
resolvePath(path: string): string;
fileExists(fileName: string): boolean;
readFile(fileName: string): string;
}, errors?: Diagnostic[]): void;
}
declare namespace ts {
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
@ -2273,6 +2301,7 @@ declare namespace ts {
function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
}
declare namespace ts {
function moduleHasNonRelativeName(moduleName: string): boolean;
function getEffectiveTypeRoots(options: CompilerOptions, host: {
directoryExists?: (directoryName: string) => boolean;
getCurrentDirectory?: () => string;
@ -2297,8 +2326,6 @@ declare namespace ts {
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
}
declare namespace ts {
/** The version of the TypeScript compiler release */
const version = "2.2.0-dev.20161115";
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string;
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
@ -2343,8 +2370,8 @@ declare namespace ts {
options: CompilerOptions;
errors: Diagnostic[];
};
function convertTypingOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
options: TypingOptions;
function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
options: TypeAcquisition;
errors: Diagnostic[];
};
}
@ -2393,6 +2420,7 @@ declare namespace ts {
}
interface SourceFile {
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
getLineEndOfPosition(pos: number): number;
getLineStarts(): number[];
getPositionOfLineAndCharacter(line: number, character: number): number;
update(newText: string, textChangeRange: TextChangeRange): SourceFile;

File diff suppressed because it is too large Load Diff

View File

@ -136,6 +136,9 @@ var ts;
})(performance = ts.performance || (ts.performance = {}));
})(ts || (ts = {}));
var ts;
(function (ts) {
ts.version = "2.2.0-dev.20161127";
})(ts || (ts = {}));
(function (ts) {
var createObject = Object.create;
ts.collator = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator() : undefined;
@ -606,7 +609,7 @@ var ts;
if (value === undefined)
return to;
if (to === undefined)
to = [];
return [value];
to.push(value);
return to;
}
@ -621,6 +624,14 @@ var ts;
return to;
}
ts.addRange = addRange;
function stableSort(array, comparer) {
if (comparer === void 0) { comparer = compareValues; }
return array
.map(function (_, i) { return i; })
.sort(function (x, y) { return comparer(array[x], array[y]) || compareValues(x, y); })
.map(function (i) { return array[i]; });
}
ts.stableSort = stableSort;
function rangeEquals(array1, array2, pos, end) {
while (pos < end) {
if (array1[pos] !== array2[pos]) {
@ -775,6 +786,15 @@ var ts;
}
}
ts.copyProperties = copyProperties;
function appendProperty(map, key, value) {
if (key === undefined || value === undefined)
return map;
if (map === undefined)
map = createMap();
map[key] = value;
return map;
}
ts.appendProperty = appendProperty;
function assign(t) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
@ -1227,6 +1247,14 @@ var ts;
getEmitScriptTarget(compilerOptions) >= 2 ? ts.ModuleKind.ES2015 : ts.ModuleKind.CommonJS;
}
ts.getEmitModuleKind = getEmitModuleKind;
function getEmitModuleResolutionKind(compilerOptions) {
var moduleResolution = compilerOptions.moduleResolution;
if (moduleResolution === undefined) {
moduleResolution = getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
}
return moduleResolution;
}
ts.getEmitModuleResolutionKind = getEmitModuleResolutionKind;
function hasZeroOrOneAsteriskCharacter(str) {
var seenAsterisk = false;
for (var i = 0; i < str.length; i++) {
@ -1777,6 +1805,16 @@ var ts;
}
Debug.fail = fail;
})(Debug = ts.Debug || (ts.Debug = {}));
function orderedRemoveItem(array, item) {
for (var i = 0; i < array.length; i++) {
if (array[i] === item) {
orderedRemoveItemAt(array, i);
return true;
}
}
return false;
}
ts.orderedRemoveItem = orderedRemoveItem;
function orderedRemoveItemAt(array, index) {
for (var i = index; i < array.length - 1; i++) {
array[i] = array[i + 1];
@ -2811,7 +2849,7 @@ var ts;
Object_is_possibly_null_or_undefined: { code: 2533, category: ts.DiagnosticCategory.Error, key: "Object_is_possibly_null_or_undefined_2533", message: "Object is possibly 'null' or 'undefined'." },
A_function_returning_never_cannot_have_a_reachable_end_point: { code: 2534, category: ts.DiagnosticCategory.Error, key: "A_function_returning_never_cannot_have_a_reachable_end_point_2534", message: "A function returning 'never' cannot have a reachable end point." },
Enum_type_0_has_members_with_initializers_that_are_not_literals: { code: 2535, category: ts.DiagnosticCategory.Error, key: "Enum_type_0_has_members_with_initializers_that_are_not_literals_2535", message: "Enum type '{0}' has members with initializers that are not literals." },
Type_0_is_not_constrained_to_keyof_1: { code: 2536, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_constrained_to_keyof_1_2536", message: "Type '{0}' is not constrained to 'keyof {1}'." },
Type_0_cannot_be_used_to_index_type_1: { code: 2536, category: ts.DiagnosticCategory.Error, key: "Type_0_cannot_be_used_to_index_type_1_2536", message: "Type '{0}' cannot be used to index type '{1}'." },
Type_0_has_no_matching_index_signature_for_type_1: { code: 2537, category: ts.DiagnosticCategory.Error, key: "Type_0_has_no_matching_index_signature_for_type_1_2537", message: "Type '{0}' has no matching index signature for type '{1}'." },
Type_0_cannot_be_used_as_an_index_type: { code: 2538, category: ts.DiagnosticCategory.Error, key: "Type_0_cannot_be_used_as_an_index_type_2538", message: "Type '{0}' cannot be used as an index type." },
Cannot_assign_to_0_because_it_is_not_a_variable: { code: 2539, category: ts.DiagnosticCategory.Error, key: "Cannot_assign_to_0_because_it_is_not_a_variable_2539", message: "Cannot assign to '{0}' because it is not a variable." },
@ -2876,7 +2914,8 @@ var ts;
An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: { code: 2697, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", message: "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option." },
Spread_types_may_only_be_created_from_object_types: { code: 2698, category: ts.DiagnosticCategory.Error, key: "Spread_types_may_only_be_created_from_object_types_2698", message: "Spread types may only be created from object types." },
Rest_types_may_only_be_created_from_object_types: { code: 2700, category: ts.DiagnosticCategory.Error, key: "Rest_types_may_only_be_created_from_object_types_2700", message: "Rest types may only be created from object types." },
An_object_rest_element_must_be_an_identifier: { code: 2701, category: ts.DiagnosticCategory.Error, key: "An_object_rest_element_must_be_an_identifier_2701", message: "An object rest element must be an identifier." },
The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: { code: 2701, category: ts.DiagnosticCategory.Error, key: "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", message: "The target of an object rest assignment must be a variable or a property access." },
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
@ -2947,6 +2986,7 @@ var ts;
Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: ts.DiagnosticCategory.Error, key: "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", message: "Parameter '{0}' of exported function has or is using private name '{1}'." },
Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: ts.DiagnosticCategory.Error, key: "Exported_type_alias_0_has_or_is_using_private_name_1_4081", message: "Exported type alias '{0}' has or is using private name '{1}'." },
Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: ts.DiagnosticCategory.Error, key: "Default_export_of_the_module_has_or_is_using_private_name_0_4082", message: "Default export of the module has or is using private name '{0}'." },
Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: { code: 4083, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", message: "Type parameter '{0}' of exported type alias has or is using private name '{1}'." },
Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: { code: 4090, category: ts.DiagnosticCategory.Message, key: "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", message: "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict." },
The_current_host_does_not_support_the_0_option: { code: 5001, category: ts.DiagnosticCategory.Error, key: "The_current_host_does_not_support_the_0_option_5001", message: "The current host does not support the '{0}' option." },
Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: ts.DiagnosticCategory.Error, key: "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", message: "Cannot find the common subdirectory path for the input files." },
@ -3161,9 +3201,9 @@ var ts;
A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: { code: 17007, category: ts.DiagnosticCategory.Error, key: "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", message: "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses." },
JSX_element_0_has_no_corresponding_closing_tag: { code: 17008, category: ts.DiagnosticCategory.Error, key: "JSX_element_0_has_no_corresponding_closing_tag_17008", message: "JSX element '{0}' has no corresponding closing tag." },
super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: { code: 17009, category: ts.DiagnosticCategory.Error, key: "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", message: "'super' must be called before accessing 'this' in the constructor of a derived class." },
Unknown_typing_option_0: { code: 17010, category: ts.DiagnosticCategory.Error, key: "Unknown_typing_option_0_17010", message: "Unknown typing option '{0}'." },
Unknown_type_acquisition_option_0: { code: 17010, category: ts.DiagnosticCategory.Error, key: "Unknown_type_acquisition_option_0_17010", message: "Unknown type acquisition option '{0}'." },
Circularity_detected_while_resolving_configuration_Colon_0: { code: 18000, category: ts.DiagnosticCategory.Error, key: "Circularity_detected_while_resolving_configuration_Colon_0_18000", message: "Circularity detected while resolving configuration: {0}" },
The_path_in_an_extends_options_must_be_relative_or_rooted: { code: 18001, category: ts.DiagnosticCategory.Error, key: "The_path_in_an_extends_options_must_be_relative_or_rooted_18001", message: "The path in an 'extends' options must be relative or rooted." },
A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: { code: 18001, category: ts.DiagnosticCategory.Error, key: "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", message: "A path in an 'extends' option must be relative or rooted, but '{0}' is not." },
The_files_list_in_config_file_0_is_empty: { code: 18002, category: ts.DiagnosticCategory.Error, key: "The_files_list_in_config_file_0_is_empty_18002", message: "The 'files' list in config file '{0}' is empty." },
No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: { code: 18003, category: ts.DiagnosticCategory.Error, key: "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", message: "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'." },
Add_missing_super_call: { code: 90001, category: ts.DiagnosticCategory.Message, key: "Add_missing_super_call_90001", message: "Add missing 'super()' call." },
@ -3175,6 +3215,9 @@ var ts;
Implement_inherited_abstract_class: { code: 90007, category: ts.DiagnosticCategory.Message, key: "Implement_inherited_abstract_class_90007", message: "Implement inherited abstract class" },
Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: { code: 90009, category: ts.DiagnosticCategory.Error, key: "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__90009", message: "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig" },
Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: { code: 90010, category: ts.DiagnosticCategory.Error, key: "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_90010", message: "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated." },
Import_0_from_1: { code: 90013, category: ts.DiagnosticCategory.Message, key: "Import_0_from_1_90013", message: "Import {0} from {1}" },
Change_0_to_1: { code: 90014, category: ts.DiagnosticCategory.Message, key: "Change_0_to_1_90014", message: "Change {0} to {1}" },
Add_0_to_existing_import_declaration_from_1: { code: 90015, category: ts.DiagnosticCategory.Message, key: "Add_0_to_existing_import_declaration_from_1_90015", message: "Add {0} to existing import declaration from {1}" },
};
})(ts || (ts = {}));
var ts;
@ -5176,11 +5219,15 @@ var ts;
description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
}
];
ts.typingOptionDeclarations = [
ts.typeAcquisitionDeclarations = [
{
name: "enableAutoDiscovery",
type: "boolean",
},
{
name: "enable",
type: "boolean",
},
{
name: "include",
type: "list",
@ -5205,6 +5252,18 @@ var ts;
sourceMap: false,
};
var optionNameMapCache;
function convertEnableAutoDiscoveryToEnable(typeAcquisition) {
if (typeAcquisition && typeAcquisition.enableAutoDiscovery !== undefined && typeAcquisition.enable === undefined) {
var result = {
enable: typeAcquisition.enableAutoDiscovery,
include: typeAcquisition.include || [],
exclude: typeAcquisition.exclude || []
};
return result;
}
return typeAcquisition;
}
ts.convertEnableAutoDiscoveryToEnable = convertEnableAutoDiscoveryToEnable;
function getOptionNameMap() {
if (optionNameMapCache) {
return optionNameMapCache;
@ -5484,14 +5543,15 @@ var ts;
return {
options: {},
fileNames: [],
typingOptions: {},
typeAcquisition: {},
raw: json,
errors: [ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, resolutionStack.concat([resolvedPath]).join(" -> "))],
wildcardDirectories: {}
};
}
var options = convertCompilerOptionsFromJsonWorker(json["compilerOptions"], basePath, errors, configFileName);
var typingOptions = convertTypingOptionsFromJsonWorker(json["typingOptions"], basePath, errors, configFileName);
var jsonOptions = json["typeAcquisition"] || json["typingOptions"];
var typeAcquisition = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
if (json["extends"]) {
var _a = [undefined, undefined, undefined, {}], include = _a[0], exclude = _a[1], files = _a[2], baseOptions = _a[3];
if (typeof json["extends"] === "string") {
@ -5518,7 +5578,7 @@ var ts;
return {
options: options,
fileNames: fileNames,
typingOptions: typingOptions,
typeAcquisition: typeAcquisition,
raw: json,
errors: errors,
wildcardDirectories: wildcardDirectories,
@ -5526,7 +5586,7 @@ var ts;
};
function tryExtendsName(extendedConfig) {
if (!(ts.isRootedDiskPath(extendedConfig) || ts.startsWith(ts.normalizeSlashes(extendedConfig), "./") || ts.startsWith(ts.normalizeSlashes(extendedConfig), "../"))) {
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.The_path_in_an_extends_options_must_be_relative_or_rooted));
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not, extendedConfig));
return;
}
var extendedConfigPath = ts.toPath(extendedConfig, basePath, getCanonicalFileName);
@ -5589,7 +5649,7 @@ var ts;
errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
}
else {
excludeSpecs = ["node_modules", "bower_components", "jspm_packages"];
excludeSpecs = includeSpecs ? [] : ["node_modules", "bower_components", "jspm_packages"];
var outDir = json["compilerOptions"] && json["compilerOptions"]["outDir"];
if (outDir) {
excludeSpecs.push(outDir);
@ -5624,12 +5684,12 @@ var ts;
return { options: options, errors: errors };
}
ts.convertCompilerOptionsFromJson = convertCompilerOptionsFromJson;
function convertTypingOptionsFromJson(jsonOptions, basePath, configFileName) {
function convertTypeAcquisitionFromJson(jsonOptions, basePath, configFileName) {
var errors = [];
var options = convertTypingOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName);
var options = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName);
return { options: options, errors: errors };
}
ts.convertTypingOptionsFromJson = convertTypingOptionsFromJson;
ts.convertTypeAcquisitionFromJson = convertTypeAcquisitionFromJson;
function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) {
var options = ts.getBaseFileName(configFileName) === "jsconfig.json"
? { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true }
@ -5637,9 +5697,10 @@ var ts;
convertOptionsFromJson(ts.optionDeclarations, jsonOptions, basePath, options, ts.Diagnostics.Unknown_compiler_option_0, errors);
return options;
}
function convertTypingOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) {
var options = { enableAutoDiscovery: ts.getBaseFileName(configFileName) === "jsconfig.json", include: [], exclude: [] };
convertOptionsFromJson(ts.typingOptionDeclarations, jsonOptions, basePath, options, ts.Diagnostics.Unknown_typing_option_0, errors);
function convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName) {
var options = { enable: ts.getBaseFileName(configFileName) === "jsconfig.json", include: [], exclude: [] };
var typeAcquisition = convertEnableAutoDiscoveryToEnable(jsonOptions);
convertOptionsFromJson(ts.typeAcquisitionDeclarations, typeAcquisition, basePath, options, ts.Diagnostics.Unknown_type_acquisition_option_0, errors);
return options;
}
function convertOptionsFromJson(optionDeclarations, jsonOptions, basePath, defaultOptions, diagnosticMessage, errors) {
@ -5858,9 +5919,9 @@ var ts;
"constants", "process", "v8", "timers", "console"
];
var nodeCoreModules = ts.arrayToMap(JsTyping.nodeCoreModuleList, function (x) { return x; });
function discoverTypings(host, fileNames, projectRootPath, safeListPath, packageNameToTypingLocation, typingOptions, unresolvedImports) {
function discoverTypings(host, fileNames, projectRootPath, safeListPath, packageNameToTypingLocation, typeAcquisition, unresolvedImports) {
var inferredTypings = ts.createMap();
if (!typingOptions || !typingOptions.enableAutoDiscovery) {
if (!typeAcquisition || !typeAcquisition.enable) {
return { cachedTypingPaths: [], newTypingNames: [], filesToWatch: [] };
}
fileNames = ts.filter(ts.map(fileNames, ts.normalizePath), function (f) {
@ -5874,8 +5935,8 @@ var ts;
var filesToWatch = [];
var searchDirs = [];
var exclude = [];
mergeTypings(typingOptions.include);
exclude = typingOptions.exclude || [];
mergeTypings(typeAcquisition.include);
exclude = typeAcquisition.exclude || [];
var possibleSearchDirs = ts.map(fileNames, ts.getDirectoryPath);
if (projectRootPath) {
possibleSearchDirs.push(projectRootPath);
@ -6058,6 +6119,7 @@ var ts;
function moduleHasNonRelativeName(moduleName) {
return !(ts.isRootedDiskPath(moduleName) || ts.isExternalModuleNameRelative(moduleName));
}
ts.moduleHasNonRelativeName = moduleHasNonRelativeName;
function tryReadTypesSection(extensions, packageJsonPath, baseDirectory, state) {
var jsonContent = readJson(packageJsonPath, state.host);
switch (extensions) {
@ -6619,10 +6681,18 @@ var ts;
isEnabled: function () { return false; },
writeLine: ts.noop
};
function typingToFileName(cachePath, packageName, installTypingHost) {
function typingToFileName(cachePath, packageName, installTypingHost, log) {
try {
var result = ts.resolveModuleName(packageName, ts.combinePaths(cachePath, "index.d.ts"), { moduleResolution: ts.ModuleResolutionKind.NodeJs }, installTypingHost);
return result.resolvedModule && result.resolvedModule.resolvedFileName;
}
catch (e) {
if (log.isEnabled()) {
log.writeLine("Failed to resolve " + packageName + " in folder '" + cachePath + "': " + e.message);
}
return undefined;
}
}
var PackageNameValidationResult;
(function (PackageNameValidationResult) {
PackageNameValidationResult[PackageNameValidationResult["Ok"] = 0] = "Ok";
@ -6710,7 +6780,7 @@ var ts;
}
this.processCacheLocation(req.cachePath);
}
var discoverTypingsResult = ts.JsTyping.discoverTypings(this.installTypingHost, req.fileNames, req.projectRootPath, this.safeListPath, this.packageNameToTypingLocation, req.typingOptions, req.unresolvedImports);
var discoverTypingsResult = ts.JsTyping.discoverTypings(this.installTypingHost, req.fileNames, req.projectRootPath, this.safeListPath, this.packageNameToTypingLocation, req.typeAcquisition, req.unresolvedImports);
if (this.log.isEnabled()) {
this.log.writeLine("Finished typings discovery: " + JSON.stringify(discoverTypingsResult));
}
@ -6750,8 +6820,9 @@ var ts;
if (!packageName) {
continue;
}
var typingFile = typingToFileName(cacheLocation, packageName, this.installTypingHost);
var typingFile = typingToFileName(cacheLocation, packageName, this.installTypingHost, this.log);
if (!typingFile) {
this.missingTypingsSet[packageName] = true;
continue;
}
var existingTypingFile = this.packageNameToTypingLocation[packageName];
@ -6782,7 +6853,7 @@ var ts;
var result = [];
for (var _i = 0, typingsToInstall_1 = typingsToInstall; _i < typingsToInstall_1.length; _i++) {
var typing = typingsToInstall_1[_i];
if (this.missingTypingsSet[typing]) {
if (this.missingTypingsSet[typing] || this.packageNameToTypingLocation[typing]) {
continue;
}
var validationResult = validatePackageName(typing);
@ -6858,7 +6929,8 @@ var ts;
_this.sendResponse({
kind: server.EventInstall,
packagesToInstall: scopedTypings,
installSuccess: ok
installSuccess: ok,
typingsInstallerVersion: ts.version
});
}
if (!ok) {
@ -6872,17 +6944,14 @@ var ts;
return;
}
if (_this.log.isEnabled()) {
_this.log.writeLine("Requested to install typings " + JSON.stringify(scopedTypings) + ", installed typings " + JSON.stringify(scopedTypings));
_this.log.writeLine("Installed typings " + JSON.stringify(scopedTypings));
}
var installedTypingFiles = [];
for (var _a = 0, scopedTypings_1 = scopedTypings; _a < scopedTypings_1.length; _a++) {
var t = scopedTypings_1[_a];
var packageName = ts.getBaseFileName(t);
if (!packageName) {
continue;
}
var typingFile = typingToFileName(cachePath, packageName, _this.installTypingHost);
for (var _a = 0, filteredTypings_2 = filteredTypings; _a < filteredTypings_2.length; _a++) {
var packageName = filteredTypings_2[_a];
var typingFile = typingToFileName(cachePath, packageName, _this.installTypingHost, _this.log);
if (!typingFile) {
_this.missingTypingsSet[packageName] = true;
continue;
}
if (!_this.packageNameToTypingLocation[packageName]) {
@ -6931,7 +7000,7 @@ var ts;
TypingsInstaller.prototype.createSetTypings = function (request, typings) {
return {
projectName: request.projectName,
typingOptions: request.typingOptions,
typeAcquisition: request.typeAcquisition,
compilerOptions: request.compilerOptions,
typings: typings,
unresolvedImports: request.unresolvedImports,
@ -7022,14 +7091,13 @@ var ts;
_this.log.writeLine("Process id: " + process.pid);
}
_this.npmPath = getNPMLocation(process.argv[0]);
var execSync;
(_a = require("child_process"), _this.exec = _a.exec, execSync = _a.execSync, _a);
(_this.execSync = require("child_process").execSync);
_this.ensurePackageDirectoryExists(globalTypingsCacheLocation);
try {
if (_this.log.isEnabled()) {
_this.log.writeLine("Updating " + TypesRegistryPackageName + " npm package...");
}
execSync(_this.npmPath + " install " + TypesRegistryPackageName, { cwd: globalTypingsCacheLocation, stdio: "ignore" });
_this.execSync(_this.npmPath + " install " + TypesRegistryPackageName, { cwd: globalTypingsCacheLocation, stdio: "ignore" });
}
catch (e) {
if (_this.log.isEnabled()) {
@ -7038,7 +7106,6 @@ var ts;
}
_this.typesRegistry = loadTypesRegistryFile(getTypesRegistryFileLocation(globalTypingsCacheLocation), _this.installTypingHost, _this.log);
return _this;
var _a;
}
NodeTypingsInstaller.prototype.listen = function () {
var _this = this;
@ -7062,18 +7129,26 @@ var ts;
}
};
NodeTypingsInstaller.prototype.installWorker = function (requestId, args, cwd, onRequestCompleted) {
var _this = this;
if (this.log.isEnabled()) {
this.log.writeLine("#" + requestId + " with arguments'" + JSON.stringify(args) + "'.");
}
var command = this.npmPath + " install " + args.join(" ") + " --save-dev";
var command = this.npmPath + " install " + args.join(" ") + " --save-dev --user-agent=\"typesInstaller/" + ts.version + "\"";
var start = Date.now();
this.exec(command, { cwd: cwd }, function (err, stdout, stderr) {
if (_this.log.isEnabled()) {
_this.log.writeLine("npm install #" + requestId + " took: " + (Date.now() - start) + " ms" + ts.sys.newLine + "stdout: " + stdout + ts.sys.newLine + "stderr: " + stderr);
var stdout;
var stderr;
var hasError = false;
try {
stdout = this.execSync(command, { cwd: cwd });
}
onRequestCompleted(!err);
});
catch (e) {
stdout = e.stdout;
stderr = e.stderr;
hasError = true;
}
if (this.log.isEnabled()) {
this.log.writeLine("npm install #" + requestId + " took: " + (Date.now() - start) + " ms" + ts.sys.newLine + "stdout: " + (stdout && stdout.toString()) + ts.sys.newLine + "stderr: " + (stderr && stderr.toString()));
}
onRequestCompleted(!hasError);
};
return NodeTypingsInstaller;
}(typingsInstaller.TypingsInstaller));

View File

@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "http://typescriptlang.org/",
"version": "2.2.0-dev.20161115",
"version": "2.2.0-dev.20161127",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [