mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge remote-tracking branch 'upstream/master' into jsDoc2
This commit is contained in:
+3
-2
@@ -912,10 +912,11 @@ function lintFileAsync(options, path, cb) {
|
||||
}
|
||||
|
||||
var servicesLintTargets = [
|
||||
"services.ts",
|
||||
"outliningElementsCollector.ts",
|
||||
"navigateTo.ts",
|
||||
"outliningElementsCollector.ts",
|
||||
"patternMatcher.ts",
|
||||
"services.ts",
|
||||
"shims.ts",
|
||||
].map(function (s) {
|
||||
return path.join(servicesDirectory, s);
|
||||
});
|
||||
|
||||
Vendored
+31
-13
@@ -3847,7 +3847,7 @@ interface Symbol {
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Object;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Symbol";
|
||||
}
|
||||
|
||||
interface SymbolConstructor {
|
||||
@@ -4405,7 +4405,7 @@ interface IterableIterator<T> extends Iterator<T> {
|
||||
}
|
||||
|
||||
interface GeneratorFunction extends Function {
|
||||
|
||||
[Symbol.toStringTag]: "GeneratorFunction";
|
||||
}
|
||||
|
||||
interface GeneratorFunctionConstructor {
|
||||
@@ -4530,7 +4530,7 @@ interface Math {
|
||||
*/
|
||||
cbrt(x: number): number;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Math";
|
||||
}
|
||||
|
||||
interface Date {
|
||||
@@ -4647,7 +4647,7 @@ interface Map<K, V> {
|
||||
size: number;
|
||||
values(): IterableIterator<V>;
|
||||
[Symbol.iterator]():IterableIterator<[K,V]>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Map";
|
||||
}
|
||||
|
||||
interface MapConstructor {
|
||||
@@ -4664,7 +4664,7 @@ interface WeakMap<K, V> {
|
||||
get(key: K): V;
|
||||
has(key: K): boolean;
|
||||
set(key: K, value?: V): WeakMap<K, V>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "WeakMap";
|
||||
}
|
||||
|
||||
interface WeakMapConstructor {
|
||||
@@ -4686,7 +4686,7 @@ interface Set<T> {
|
||||
size: number;
|
||||
values(): IterableIterator<T>;
|
||||
[Symbol.iterator]():IterableIterator<T>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Set";
|
||||
}
|
||||
|
||||
interface SetConstructor {
|
||||
@@ -4702,7 +4702,7 @@ interface WeakSet<T> {
|
||||
clear(): void;
|
||||
delete(value: T): boolean;
|
||||
has(value: T): boolean;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "WeakSet";
|
||||
}
|
||||
|
||||
interface WeakSetConstructor {
|
||||
@@ -4714,7 +4714,7 @@ interface WeakSetConstructor {
|
||||
declare var WeakSet: WeakSetConstructor;
|
||||
|
||||
interface JSON {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "JSON";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4724,11 +4724,11 @@ interface JSON {
|
||||
* buffer as needed.
|
||||
*/
|
||||
interface ArrayBuffer {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "ArrayBuffer";
|
||||
}
|
||||
|
||||
interface DataView {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "DataView";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4749,6 +4749,7 @@ interface Int8Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int8Array";
|
||||
}
|
||||
|
||||
interface Int8ArrayConstructor {
|
||||
@@ -4781,6 +4782,7 @@ interface Uint8Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "UInt8Array";
|
||||
}
|
||||
|
||||
interface Uint8ArrayConstructor {
|
||||
@@ -4816,6 +4818,7 @@ interface Uint8ClampedArray {
|
||||
values(): IterableIterator<number>;
|
||||
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint8ClampedArray";
|
||||
}
|
||||
|
||||
interface Uint8ClampedArrayConstructor {
|
||||
@@ -4853,6 +4856,7 @@ interface Int16Array {
|
||||
|
||||
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int16Array";
|
||||
}
|
||||
|
||||
interface Int16ArrayConstructor {
|
||||
@@ -4885,6 +4889,7 @@ interface Uint16Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint16Array";
|
||||
}
|
||||
|
||||
interface Uint16ArrayConstructor {
|
||||
@@ -4917,6 +4922,7 @@ interface Int32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int32Array";
|
||||
}
|
||||
|
||||
interface Int32ArrayConstructor {
|
||||
@@ -4949,6 +4955,7 @@ interface Uint32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint32Array";
|
||||
}
|
||||
|
||||
interface Uint32ArrayConstructor {
|
||||
@@ -4981,6 +4988,7 @@ interface Float32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Float32Array";
|
||||
}
|
||||
|
||||
interface Float32ArrayConstructor {
|
||||
@@ -5013,6 +5021,7 @@ interface Float64Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Float64Array";
|
||||
}
|
||||
|
||||
interface Float64ArrayConstructor {
|
||||
@@ -5064,7 +5073,7 @@ declare namespace Reflect {
|
||||
function isExtensible(target: any): boolean;
|
||||
function ownKeys(target: any): Array<PropertyKey>;
|
||||
function preventExtensions(target: any): boolean;
|
||||
function set(target: any, propertyKey: PropertyKey, value: any, receiver? :any): boolean;
|
||||
function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
|
||||
function setPrototypeOf(target: any, proto: any): boolean;
|
||||
}
|
||||
|
||||
@@ -5089,7 +5098,7 @@ interface Promise<T> {
|
||||
catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
|
||||
catch(onrejected?: (reason: any) => void): Promise<T>;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Promise";
|
||||
}
|
||||
|
||||
interface PromiseConstructor {
|
||||
@@ -5112,7 +5121,16 @@ interface PromiseConstructor {
|
||||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
*/
|
||||
all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
|
||||
all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
|
||||
all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
|
||||
all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
|
||||
all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
|
||||
all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
|
||||
all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
|
||||
|
||||
/**
|
||||
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
||||
|
||||
Vendored
+41
-15
@@ -4362,6 +4362,7 @@ interface AudioContext extends EventTarget {
|
||||
destination: AudioDestinationNode;
|
||||
listener: AudioListener;
|
||||
sampleRate: number;
|
||||
state: string;
|
||||
createAnalyser(): AnalyserNode;
|
||||
createBiquadFilter(): BiquadFilterNode;
|
||||
createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
|
||||
@@ -6099,6 +6100,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
|
||||
* Gets or sets the version attribute specified in the declaration of an XML document.
|
||||
*/
|
||||
xmlVersion: string;
|
||||
currentScript: HTMLScriptElement;
|
||||
adoptNode(source: Node): Node;
|
||||
captureEvents(): void;
|
||||
clear(): void;
|
||||
@@ -6814,6 +6816,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
tagName: string;
|
||||
id: string;
|
||||
className: string;
|
||||
innerHTML: string;
|
||||
getAttribute(name?: string): string;
|
||||
getAttributeNS(namespaceURI: string, localName: string): string;
|
||||
getAttributeNode(name: string): Attr;
|
||||
@@ -7009,7 +7012,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
removeAttributeNode(oldAttr: Attr): Attr;
|
||||
requestFullscreen(): void;
|
||||
requestPointerLock(): void;
|
||||
setAttribute(name?: string, value?: string): void;
|
||||
setAttribute(name: string, value: string): void;
|
||||
setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
|
||||
setAttributeNode(newAttr: Attr): Attr;
|
||||
setAttributeNodeNS(newAttr: Attr): Attr;
|
||||
@@ -7018,6 +7021,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
webkitRequestFullScreen(): void;
|
||||
webkitRequestFullscreen(): void;
|
||||
getElementsByClassName(classNames: string): NodeListOf<Element>;
|
||||
matches(selector: string): boolean;
|
||||
addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
@@ -8002,7 +8006,6 @@ interface HTMLElement extends Element {
|
||||
title: string;
|
||||
blur(): void;
|
||||
click(): void;
|
||||
contains(child: HTMLElement): boolean;
|
||||
dragDrop(): boolean;
|
||||
focus(): void;
|
||||
insertAdjacentElement(position: string, insertedElement: Element): Element;
|
||||
@@ -9552,7 +9555,7 @@ interface HTMLMediaElement extends HTMLElement {
|
||||
* Gets or sets the current playback position, in seconds.
|
||||
*/
|
||||
preload: string;
|
||||
readyState: any;
|
||||
readyState: number;
|
||||
/**
|
||||
* Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
|
||||
*/
|
||||
@@ -10176,7 +10179,7 @@ interface HTMLSelectElement extends HTMLElement {
|
||||
* Sets or retrieves the name of the object.
|
||||
*/
|
||||
name: string;
|
||||
options: HTMLSelectElement;
|
||||
options: HTMLCollection;
|
||||
/**
|
||||
* When present, marks an element that can't be submitted without a value.
|
||||
*/
|
||||
@@ -10209,6 +10212,7 @@ interface HTMLSelectElement extends HTMLElement {
|
||||
* Returns whether an element will successfully validate based on forms validation rules and constraints.
|
||||
*/
|
||||
willValidate: boolean;
|
||||
selectedOptions: HTMLCollection;
|
||||
/**
|
||||
* Adds an element to the areas, controlRange, or options collection.
|
||||
* @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
|
||||
@@ -10462,19 +10466,19 @@ interface HTMLTableElement extends HTMLElement {
|
||||
/**
|
||||
* Creates an empty caption element in the table.
|
||||
*/
|
||||
createCaption(): HTMLElement;
|
||||
createCaption(): HTMLTableCaptionElement;
|
||||
/**
|
||||
* Creates an empty tBody element in the table.
|
||||
*/
|
||||
createTBody(): HTMLElement;
|
||||
createTBody(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Creates an empty tFoot element in the table.
|
||||
*/
|
||||
createTFoot(): HTMLElement;
|
||||
createTFoot(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Returns the tHead element object if successful, or null otherwise.
|
||||
*/
|
||||
createTHead(): HTMLElement;
|
||||
createTHead(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Deletes the caption element and its contents from the table.
|
||||
*/
|
||||
@@ -10496,7 +10500,7 @@ interface HTMLTableElement extends HTMLElement {
|
||||
* Creates a new row (tr) in the table, and adds the row to the rows collection.
|
||||
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
|
||||
*/
|
||||
insertRow(index?: number): HTMLElement;
|
||||
insertRow(index?: number): HTMLTableRowElement;
|
||||
}
|
||||
|
||||
declare var HTMLTableElement: {
|
||||
@@ -10547,7 +10551,7 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
|
||||
* Creates a new cell in the table row, and adds the cell to the cells collection.
|
||||
* @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
|
||||
*/
|
||||
insertCell(index?: number): HTMLElement;
|
||||
insertCell(index?: number): HTMLTableCellElement;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -10574,7 +10578,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
|
||||
* Creates a new row (tr) in the table, and adds the row to the rows collection.
|
||||
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
|
||||
*/
|
||||
insertRow(index?: number): HTMLElement;
|
||||
insertRow(index?: number): HTMLTableRowElement;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -10963,7 +10967,7 @@ interface IDBDatabase extends EventTarget {
|
||||
onerror: (ev: Event) => any;
|
||||
version: string;
|
||||
close(): void;
|
||||
createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
|
||||
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
|
||||
deleteObjectStore(name: string): void;
|
||||
transaction(storeNames: any, mode?: string): IDBTransaction;
|
||||
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
|
||||
@@ -10988,10 +10992,11 @@ declare var IDBFactory: {
|
||||
}
|
||||
|
||||
interface IDBIndex {
|
||||
keyPath: string;
|
||||
keyPath: string | string[];
|
||||
name: string;
|
||||
objectStore: IDBObjectStore;
|
||||
unique: boolean;
|
||||
multiEntry: boolean;
|
||||
count(key?: any): IDBRequest;
|
||||
get(key: any): IDBRequest;
|
||||
getKey(key: any): IDBRequest;
|
||||
@@ -11028,7 +11033,7 @@ interface IDBObjectStore {
|
||||
add(value: any, key?: any): IDBRequest;
|
||||
clear(): IDBRequest;
|
||||
count(key?: any): IDBRequest;
|
||||
createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
|
||||
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
|
||||
delete(key: any): IDBRequest;
|
||||
deleteIndex(indexName: string): void;
|
||||
get(key: any): IDBRequest;
|
||||
@@ -11112,7 +11117,7 @@ declare var IDBVersionChangeEvent: {
|
||||
}
|
||||
|
||||
interface ImageData {
|
||||
data: number[];
|
||||
data: Uint8ClampedArray;
|
||||
height: number;
|
||||
width: number;
|
||||
}
|
||||
@@ -11910,6 +11915,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
|
||||
getGamepads(): Gamepad[];
|
||||
javaEnabled(): boolean;
|
||||
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
|
||||
vibrate(pattern: number | number[]): boolean;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -11950,6 +11956,7 @@ interface Node extends EventTarget {
|
||||
normalize(): void;
|
||||
removeChild(oldChild: Node): Node;
|
||||
replaceChild(newChild: Node, oldChild: Node): Node;
|
||||
contains(node: Node): boolean;
|
||||
ATTRIBUTE_NODE: number;
|
||||
CDATA_SECTION_NODE: number;
|
||||
COMMENT_NODE: number;
|
||||
@@ -16613,6 +16620,16 @@ interface XMLHttpRequestEventTarget {
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
interface IDBObjectStoreParameters {
|
||||
keyPath?: string | string[];
|
||||
autoIncrement?: boolean;
|
||||
}
|
||||
|
||||
interface IDBIndexParameters {
|
||||
unique?: boolean;
|
||||
multiEntry?: boolean;
|
||||
}
|
||||
|
||||
interface NodeListOf<TNode extends Node> extends NodeList {
|
||||
length: number;
|
||||
item(index: number): TNode;
|
||||
@@ -16648,6 +16665,15 @@ interface ProgressEventInit extends EventInit {
|
||||
total?: number;
|
||||
}
|
||||
|
||||
interface HTMLTemplateElement extends HTMLElement {
|
||||
content: DocumentFragment;
|
||||
}
|
||||
|
||||
declare var HTMLTemplateElement: {
|
||||
prototype: HTMLTemplateElement;
|
||||
new(): HTMLTemplateElement;
|
||||
}
|
||||
|
||||
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
|
||||
|
||||
interface ErrorEventHandler {
|
||||
|
||||
Vendored
+41
-15
@@ -538,6 +538,7 @@ interface AudioContext extends EventTarget {
|
||||
destination: AudioDestinationNode;
|
||||
listener: AudioListener;
|
||||
sampleRate: number;
|
||||
state: string;
|
||||
createAnalyser(): AnalyserNode;
|
||||
createBiquadFilter(): BiquadFilterNode;
|
||||
createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
|
||||
@@ -2275,6 +2276,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
|
||||
* Gets or sets the version attribute specified in the declaration of an XML document.
|
||||
*/
|
||||
xmlVersion: string;
|
||||
currentScript: HTMLScriptElement;
|
||||
adoptNode(source: Node): Node;
|
||||
captureEvents(): void;
|
||||
clear(): void;
|
||||
@@ -2990,6 +2992,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
tagName: string;
|
||||
id: string;
|
||||
className: string;
|
||||
innerHTML: string;
|
||||
getAttribute(name?: string): string;
|
||||
getAttributeNS(namespaceURI: string, localName: string): string;
|
||||
getAttributeNode(name: string): Attr;
|
||||
@@ -3185,7 +3188,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
removeAttributeNode(oldAttr: Attr): Attr;
|
||||
requestFullscreen(): void;
|
||||
requestPointerLock(): void;
|
||||
setAttribute(name?: string, value?: string): void;
|
||||
setAttribute(name: string, value: string): void;
|
||||
setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
|
||||
setAttributeNode(newAttr: Attr): Attr;
|
||||
setAttributeNodeNS(newAttr: Attr): Attr;
|
||||
@@ -3194,6 +3197,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
webkitRequestFullScreen(): void;
|
||||
webkitRequestFullscreen(): void;
|
||||
getElementsByClassName(classNames: string): NodeListOf<Element>;
|
||||
matches(selector: string): boolean;
|
||||
addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
@@ -4178,7 +4182,6 @@ interface HTMLElement extends Element {
|
||||
title: string;
|
||||
blur(): void;
|
||||
click(): void;
|
||||
contains(child: HTMLElement): boolean;
|
||||
dragDrop(): boolean;
|
||||
focus(): void;
|
||||
insertAdjacentElement(position: string, insertedElement: Element): Element;
|
||||
@@ -5728,7 +5731,7 @@ interface HTMLMediaElement extends HTMLElement {
|
||||
* Gets or sets the current playback position, in seconds.
|
||||
*/
|
||||
preload: string;
|
||||
readyState: any;
|
||||
readyState: number;
|
||||
/**
|
||||
* Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
|
||||
*/
|
||||
@@ -6352,7 +6355,7 @@ interface HTMLSelectElement extends HTMLElement {
|
||||
* Sets or retrieves the name of the object.
|
||||
*/
|
||||
name: string;
|
||||
options: HTMLSelectElement;
|
||||
options: HTMLCollection;
|
||||
/**
|
||||
* When present, marks an element that can't be submitted without a value.
|
||||
*/
|
||||
@@ -6385,6 +6388,7 @@ interface HTMLSelectElement extends HTMLElement {
|
||||
* Returns whether an element will successfully validate based on forms validation rules and constraints.
|
||||
*/
|
||||
willValidate: boolean;
|
||||
selectedOptions: HTMLCollection;
|
||||
/**
|
||||
* Adds an element to the areas, controlRange, or options collection.
|
||||
* @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
|
||||
@@ -6638,19 +6642,19 @@ interface HTMLTableElement extends HTMLElement {
|
||||
/**
|
||||
* Creates an empty caption element in the table.
|
||||
*/
|
||||
createCaption(): HTMLElement;
|
||||
createCaption(): HTMLTableCaptionElement;
|
||||
/**
|
||||
* Creates an empty tBody element in the table.
|
||||
*/
|
||||
createTBody(): HTMLElement;
|
||||
createTBody(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Creates an empty tFoot element in the table.
|
||||
*/
|
||||
createTFoot(): HTMLElement;
|
||||
createTFoot(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Returns the tHead element object if successful, or null otherwise.
|
||||
*/
|
||||
createTHead(): HTMLElement;
|
||||
createTHead(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Deletes the caption element and its contents from the table.
|
||||
*/
|
||||
@@ -6672,7 +6676,7 @@ interface HTMLTableElement extends HTMLElement {
|
||||
* Creates a new row (tr) in the table, and adds the row to the rows collection.
|
||||
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
|
||||
*/
|
||||
insertRow(index?: number): HTMLElement;
|
||||
insertRow(index?: number): HTMLTableRowElement;
|
||||
}
|
||||
|
||||
declare var HTMLTableElement: {
|
||||
@@ -6723,7 +6727,7 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
|
||||
* Creates a new cell in the table row, and adds the cell to the cells collection.
|
||||
* @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
|
||||
*/
|
||||
insertCell(index?: number): HTMLElement;
|
||||
insertCell(index?: number): HTMLTableCellElement;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -6750,7 +6754,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
|
||||
* Creates a new row (tr) in the table, and adds the row to the rows collection.
|
||||
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
|
||||
*/
|
||||
insertRow(index?: number): HTMLElement;
|
||||
insertRow(index?: number): HTMLTableRowElement;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -7139,7 +7143,7 @@ interface IDBDatabase extends EventTarget {
|
||||
onerror: (ev: Event) => any;
|
||||
version: string;
|
||||
close(): void;
|
||||
createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
|
||||
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
|
||||
deleteObjectStore(name: string): void;
|
||||
transaction(storeNames: any, mode?: string): IDBTransaction;
|
||||
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
|
||||
@@ -7164,10 +7168,11 @@ declare var IDBFactory: {
|
||||
}
|
||||
|
||||
interface IDBIndex {
|
||||
keyPath: string;
|
||||
keyPath: string | string[];
|
||||
name: string;
|
||||
objectStore: IDBObjectStore;
|
||||
unique: boolean;
|
||||
multiEntry: boolean;
|
||||
count(key?: any): IDBRequest;
|
||||
get(key: any): IDBRequest;
|
||||
getKey(key: any): IDBRequest;
|
||||
@@ -7204,7 +7209,7 @@ interface IDBObjectStore {
|
||||
add(value: any, key?: any): IDBRequest;
|
||||
clear(): IDBRequest;
|
||||
count(key?: any): IDBRequest;
|
||||
createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
|
||||
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
|
||||
delete(key: any): IDBRequest;
|
||||
deleteIndex(indexName: string): void;
|
||||
get(key: any): IDBRequest;
|
||||
@@ -7288,7 +7293,7 @@ declare var IDBVersionChangeEvent: {
|
||||
}
|
||||
|
||||
interface ImageData {
|
||||
data: number[];
|
||||
data: Uint8ClampedArray;
|
||||
height: number;
|
||||
width: number;
|
||||
}
|
||||
@@ -8086,6 +8091,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
|
||||
getGamepads(): Gamepad[];
|
||||
javaEnabled(): boolean;
|
||||
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
|
||||
vibrate(pattern: number | number[]): boolean;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -8126,6 +8132,7 @@ interface Node extends EventTarget {
|
||||
normalize(): void;
|
||||
removeChild(oldChild: Node): Node;
|
||||
replaceChild(newChild: Node, oldChild: Node): Node;
|
||||
contains(node: Node): boolean;
|
||||
ATTRIBUTE_NODE: number;
|
||||
CDATA_SECTION_NODE: number;
|
||||
COMMENT_NODE: number;
|
||||
@@ -12789,6 +12796,16 @@ interface XMLHttpRequestEventTarget {
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
interface IDBObjectStoreParameters {
|
||||
keyPath?: string | string[];
|
||||
autoIncrement?: boolean;
|
||||
}
|
||||
|
||||
interface IDBIndexParameters {
|
||||
unique?: boolean;
|
||||
multiEntry?: boolean;
|
||||
}
|
||||
|
||||
interface NodeListOf<TNode extends Node> extends NodeList {
|
||||
length: number;
|
||||
item(index: number): TNode;
|
||||
@@ -12824,6 +12841,15 @@ interface ProgressEventInit extends EventInit {
|
||||
total?: number;
|
||||
}
|
||||
|
||||
interface HTMLTemplateElement extends HTMLElement {
|
||||
content: DocumentFragment;
|
||||
}
|
||||
|
||||
declare var HTMLTemplateElement: {
|
||||
prototype: HTMLTemplateElement;
|
||||
new(): HTMLTemplateElement;
|
||||
}
|
||||
|
||||
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
|
||||
|
||||
interface ErrorEventHandler {
|
||||
|
||||
Vendored
+72
-28
@@ -22,7 +22,7 @@ interface Symbol {
|
||||
/** Returns the primitive value of the specified object. */
|
||||
valueOf(): Object;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Symbol";
|
||||
}
|
||||
|
||||
interface SymbolConstructor {
|
||||
@@ -580,7 +580,7 @@ interface IterableIterator<T> extends Iterator<T> {
|
||||
}
|
||||
|
||||
interface GeneratorFunction extends Function {
|
||||
|
||||
[Symbol.toStringTag]: "GeneratorFunction";
|
||||
}
|
||||
|
||||
interface GeneratorFunctionConstructor {
|
||||
@@ -705,7 +705,7 @@ interface Math {
|
||||
*/
|
||||
cbrt(x: number): number;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Math";
|
||||
}
|
||||
|
||||
interface Date {
|
||||
@@ -822,7 +822,7 @@ interface Map<K, V> {
|
||||
size: number;
|
||||
values(): IterableIterator<V>;
|
||||
[Symbol.iterator]():IterableIterator<[K,V]>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Map";
|
||||
}
|
||||
|
||||
interface MapConstructor {
|
||||
@@ -839,7 +839,7 @@ interface WeakMap<K, V> {
|
||||
get(key: K): V;
|
||||
has(key: K): boolean;
|
||||
set(key: K, value?: V): WeakMap<K, V>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "WeakMap";
|
||||
}
|
||||
|
||||
interface WeakMapConstructor {
|
||||
@@ -861,7 +861,7 @@ interface Set<T> {
|
||||
size: number;
|
||||
values(): IterableIterator<T>;
|
||||
[Symbol.iterator]():IterableIterator<T>;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Set";
|
||||
}
|
||||
|
||||
interface SetConstructor {
|
||||
@@ -877,7 +877,7 @@ interface WeakSet<T> {
|
||||
clear(): void;
|
||||
delete(value: T): boolean;
|
||||
has(value: T): boolean;
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "WeakSet";
|
||||
}
|
||||
|
||||
interface WeakSetConstructor {
|
||||
@@ -889,7 +889,7 @@ interface WeakSetConstructor {
|
||||
declare var WeakSet: WeakSetConstructor;
|
||||
|
||||
interface JSON {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "JSON";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -899,11 +899,11 @@ interface JSON {
|
||||
* buffer as needed.
|
||||
*/
|
||||
interface ArrayBuffer {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "ArrayBuffer";
|
||||
}
|
||||
|
||||
interface DataView {
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "DataView";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -924,6 +924,7 @@ interface Int8Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int8Array";
|
||||
}
|
||||
|
||||
interface Int8ArrayConstructor {
|
||||
@@ -956,6 +957,7 @@ interface Uint8Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "UInt8Array";
|
||||
}
|
||||
|
||||
interface Uint8ArrayConstructor {
|
||||
@@ -991,6 +993,7 @@ interface Uint8ClampedArray {
|
||||
values(): IterableIterator<number>;
|
||||
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint8ClampedArray";
|
||||
}
|
||||
|
||||
interface Uint8ClampedArrayConstructor {
|
||||
@@ -1028,6 +1031,7 @@ interface Int16Array {
|
||||
|
||||
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int16Array";
|
||||
}
|
||||
|
||||
interface Int16ArrayConstructor {
|
||||
@@ -1060,6 +1064,7 @@ interface Uint16Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint16Array";
|
||||
}
|
||||
|
||||
interface Uint16ArrayConstructor {
|
||||
@@ -1092,6 +1097,7 @@ interface Int32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Int32Array";
|
||||
}
|
||||
|
||||
interface Int32ArrayConstructor {
|
||||
@@ -1124,6 +1130,7 @@ interface Uint32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Uint32Array";
|
||||
}
|
||||
|
||||
interface Uint32ArrayConstructor {
|
||||
@@ -1156,6 +1163,7 @@ interface Float32Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Float32Array";
|
||||
}
|
||||
|
||||
interface Float32ArrayConstructor {
|
||||
@@ -1188,6 +1196,7 @@ interface Float64Array {
|
||||
*/
|
||||
values(): IterableIterator<number>;
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
[Symbol.toStringTag]: "Float64Array";
|
||||
}
|
||||
|
||||
interface Float64ArrayConstructor {
|
||||
@@ -1239,7 +1248,7 @@ declare namespace Reflect {
|
||||
function isExtensible(target: any): boolean;
|
||||
function ownKeys(target: any): Array<PropertyKey>;
|
||||
function preventExtensions(target: any): boolean;
|
||||
function set(target: any, propertyKey: PropertyKey, value: any, receiver? :any): boolean;
|
||||
function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
|
||||
function setPrototypeOf(target: any, proto: any): boolean;
|
||||
}
|
||||
|
||||
@@ -1264,7 +1273,7 @@ interface Promise<T> {
|
||||
catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
|
||||
catch(onrejected?: (reason: any) => void): Promise<T>;
|
||||
|
||||
[Symbol.toStringTag]: string;
|
||||
[Symbol.toStringTag]: "Promise";
|
||||
}
|
||||
|
||||
interface PromiseConstructor {
|
||||
@@ -1287,7 +1296,16 @@ interface PromiseConstructor {
|
||||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
*/
|
||||
all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
|
||||
all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
|
||||
all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
|
||||
all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
|
||||
all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
|
||||
all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
|
||||
all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
|
||||
|
||||
/**
|
||||
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
||||
@@ -5677,6 +5695,7 @@ interface AudioContext extends EventTarget {
|
||||
destination: AudioDestinationNode;
|
||||
listener: AudioListener;
|
||||
sampleRate: number;
|
||||
state: string;
|
||||
createAnalyser(): AnalyserNode;
|
||||
createBiquadFilter(): BiquadFilterNode;
|
||||
createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
|
||||
@@ -7414,6 +7433,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
|
||||
* Gets or sets the version attribute specified in the declaration of an XML document.
|
||||
*/
|
||||
xmlVersion: string;
|
||||
currentScript: HTMLScriptElement;
|
||||
adoptNode(source: Node): Node;
|
||||
captureEvents(): void;
|
||||
clear(): void;
|
||||
@@ -8129,6 +8149,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
tagName: string;
|
||||
id: string;
|
||||
className: string;
|
||||
innerHTML: string;
|
||||
getAttribute(name?: string): string;
|
||||
getAttributeNS(namespaceURI: string, localName: string): string;
|
||||
getAttributeNode(name: string): Attr;
|
||||
@@ -8324,7 +8345,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
removeAttributeNode(oldAttr: Attr): Attr;
|
||||
requestFullscreen(): void;
|
||||
requestPointerLock(): void;
|
||||
setAttribute(name?: string, value?: string): void;
|
||||
setAttribute(name: string, value: string): void;
|
||||
setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void;
|
||||
setAttributeNode(newAttr: Attr): Attr;
|
||||
setAttributeNodeNS(newAttr: Attr): Attr;
|
||||
@@ -8333,6 +8354,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
|
||||
webkitRequestFullScreen(): void;
|
||||
webkitRequestFullscreen(): void;
|
||||
getElementsByClassName(classNames: string): NodeListOf<Element>;
|
||||
matches(selector: string): boolean;
|
||||
addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
|
||||
@@ -9317,7 +9339,6 @@ interface HTMLElement extends Element {
|
||||
title: string;
|
||||
blur(): void;
|
||||
click(): void;
|
||||
contains(child: HTMLElement): boolean;
|
||||
dragDrop(): boolean;
|
||||
focus(): void;
|
||||
insertAdjacentElement(position: string, insertedElement: Element): Element;
|
||||
@@ -10867,7 +10888,7 @@ interface HTMLMediaElement extends HTMLElement {
|
||||
* Gets or sets the current playback position, in seconds.
|
||||
*/
|
||||
preload: string;
|
||||
readyState: any;
|
||||
readyState: number;
|
||||
/**
|
||||
* Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
|
||||
*/
|
||||
@@ -11491,7 +11512,7 @@ interface HTMLSelectElement extends HTMLElement {
|
||||
* Sets or retrieves the name of the object.
|
||||
*/
|
||||
name: string;
|
||||
options: HTMLSelectElement;
|
||||
options: HTMLCollection;
|
||||
/**
|
||||
* When present, marks an element that can't be submitted without a value.
|
||||
*/
|
||||
@@ -11524,6 +11545,7 @@ interface HTMLSelectElement extends HTMLElement {
|
||||
* Returns whether an element will successfully validate based on forms validation rules and constraints.
|
||||
*/
|
||||
willValidate: boolean;
|
||||
selectedOptions: HTMLCollection;
|
||||
/**
|
||||
* Adds an element to the areas, controlRange, or options collection.
|
||||
* @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
|
||||
@@ -11777,19 +11799,19 @@ interface HTMLTableElement extends HTMLElement {
|
||||
/**
|
||||
* Creates an empty caption element in the table.
|
||||
*/
|
||||
createCaption(): HTMLElement;
|
||||
createCaption(): HTMLTableCaptionElement;
|
||||
/**
|
||||
* Creates an empty tBody element in the table.
|
||||
*/
|
||||
createTBody(): HTMLElement;
|
||||
createTBody(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Creates an empty tFoot element in the table.
|
||||
*/
|
||||
createTFoot(): HTMLElement;
|
||||
createTFoot(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Returns the tHead element object if successful, or null otherwise.
|
||||
*/
|
||||
createTHead(): HTMLElement;
|
||||
createTHead(): HTMLTableSectionElement;
|
||||
/**
|
||||
* Deletes the caption element and its contents from the table.
|
||||
*/
|
||||
@@ -11811,7 +11833,7 @@ interface HTMLTableElement extends HTMLElement {
|
||||
* Creates a new row (tr) in the table, and adds the row to the rows collection.
|
||||
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
|
||||
*/
|
||||
insertRow(index?: number): HTMLElement;
|
||||
insertRow(index?: number): HTMLTableRowElement;
|
||||
}
|
||||
|
||||
declare var HTMLTableElement: {
|
||||
@@ -11862,7 +11884,7 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
|
||||
* Creates a new cell in the table row, and adds the cell to the cells collection.
|
||||
* @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
|
||||
*/
|
||||
insertCell(index?: number): HTMLElement;
|
||||
insertCell(index?: number): HTMLTableCellElement;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -11889,7 +11911,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
|
||||
* Creates a new row (tr) in the table, and adds the row to the rows collection.
|
||||
* @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
|
||||
*/
|
||||
insertRow(index?: number): HTMLElement;
|
||||
insertRow(index?: number): HTMLTableRowElement;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -12278,7 +12300,7 @@ interface IDBDatabase extends EventTarget {
|
||||
onerror: (ev: Event) => any;
|
||||
version: string;
|
||||
close(): void;
|
||||
createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
|
||||
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
|
||||
deleteObjectStore(name: string): void;
|
||||
transaction(storeNames: any, mode?: string): IDBTransaction;
|
||||
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
|
||||
@@ -12303,10 +12325,11 @@ declare var IDBFactory: {
|
||||
}
|
||||
|
||||
interface IDBIndex {
|
||||
keyPath: string;
|
||||
keyPath: string | string[];
|
||||
name: string;
|
||||
objectStore: IDBObjectStore;
|
||||
unique: boolean;
|
||||
multiEntry: boolean;
|
||||
count(key?: any): IDBRequest;
|
||||
get(key: any): IDBRequest;
|
||||
getKey(key: any): IDBRequest;
|
||||
@@ -12343,7 +12366,7 @@ interface IDBObjectStore {
|
||||
add(value: any, key?: any): IDBRequest;
|
||||
clear(): IDBRequest;
|
||||
count(key?: any): IDBRequest;
|
||||
createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
|
||||
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
|
||||
delete(key: any): IDBRequest;
|
||||
deleteIndex(indexName: string): void;
|
||||
get(key: any): IDBRequest;
|
||||
@@ -12427,7 +12450,7 @@ declare var IDBVersionChangeEvent: {
|
||||
}
|
||||
|
||||
interface ImageData {
|
||||
data: number[];
|
||||
data: Uint8ClampedArray;
|
||||
height: number;
|
||||
width: number;
|
||||
}
|
||||
@@ -13225,6 +13248,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
|
||||
getGamepads(): Gamepad[];
|
||||
javaEnabled(): boolean;
|
||||
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
|
||||
vibrate(pattern: number | number[]): boolean;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
@@ -13265,6 +13289,7 @@ interface Node extends EventTarget {
|
||||
normalize(): void;
|
||||
removeChild(oldChild: Node): Node;
|
||||
replaceChild(newChild: Node, oldChild: Node): Node;
|
||||
contains(node: Node): boolean;
|
||||
ATTRIBUTE_NODE: number;
|
||||
CDATA_SECTION_NODE: number;
|
||||
COMMENT_NODE: number;
|
||||
@@ -17928,6 +17953,16 @@ interface XMLHttpRequestEventTarget {
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
interface IDBObjectStoreParameters {
|
||||
keyPath?: string | string[];
|
||||
autoIncrement?: boolean;
|
||||
}
|
||||
|
||||
interface IDBIndexParameters {
|
||||
unique?: boolean;
|
||||
multiEntry?: boolean;
|
||||
}
|
||||
|
||||
interface NodeListOf<TNode extends Node> extends NodeList {
|
||||
length: number;
|
||||
item(index: number): TNode;
|
||||
@@ -17963,6 +17998,15 @@ interface ProgressEventInit extends EventInit {
|
||||
total?: number;
|
||||
}
|
||||
|
||||
interface HTMLTemplateElement extends HTMLElement {
|
||||
content: DocumentFragment;
|
||||
}
|
||||
|
||||
declare var HTMLTemplateElement: {
|
||||
prototype: HTMLTemplateElement;
|
||||
new(): HTMLTemplateElement;
|
||||
}
|
||||
|
||||
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
|
||||
|
||||
interface ErrorEventHandler {
|
||||
|
||||
Vendored
+15
-4
@@ -528,7 +528,7 @@ interface IDBDatabase extends EventTarget {
|
||||
onerror: (ev: Event) => any;
|
||||
version: string;
|
||||
close(): void;
|
||||
createObjectStore(name: string, optionalParameters?: any): IDBObjectStore;
|
||||
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
|
||||
deleteObjectStore(name: string): void;
|
||||
transaction(storeNames: any, mode?: string): IDBTransaction;
|
||||
addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
|
||||
@@ -553,10 +553,11 @@ declare var IDBFactory: {
|
||||
}
|
||||
|
||||
interface IDBIndex {
|
||||
keyPath: string;
|
||||
keyPath: string | string[];
|
||||
name: string;
|
||||
objectStore: IDBObjectStore;
|
||||
unique: boolean;
|
||||
multiEntry: boolean;
|
||||
count(key?: any): IDBRequest;
|
||||
get(key: any): IDBRequest;
|
||||
getKey(key: any): IDBRequest;
|
||||
@@ -593,7 +594,7 @@ interface IDBObjectStore {
|
||||
add(value: any, key?: any): IDBRequest;
|
||||
clear(): IDBRequest;
|
||||
count(key?: any): IDBRequest;
|
||||
createIndex(name: string, keyPath: string, optionalParameters?: any): IDBIndex;
|
||||
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
|
||||
delete(key: any): IDBRequest;
|
||||
deleteIndex(indexName: string): void;
|
||||
get(key: any): IDBRequest;
|
||||
@@ -677,7 +678,7 @@ declare var IDBVersionChangeEvent: {
|
||||
}
|
||||
|
||||
interface ImageData {
|
||||
data: number[];
|
||||
data: Uint8ClampedArray;
|
||||
height: number;
|
||||
width: number;
|
||||
}
|
||||
@@ -1109,6 +1110,16 @@ interface WorkerUtils extends Object, WindowBase64 {
|
||||
setTimeout(handler: any, timeout?: any, ...args: any[]): number;
|
||||
}
|
||||
|
||||
interface IDBObjectStoreParameters {
|
||||
keyPath?: string | string[];
|
||||
autoIncrement?: boolean;
|
||||
}
|
||||
|
||||
interface IDBIndexParameters {
|
||||
unique?: boolean;
|
||||
multiEntry?: boolean;
|
||||
}
|
||||
|
||||
interface BlobPropertyBag {
|
||||
type?: string;
|
||||
endings?: string;
|
||||
|
||||
+4090
-3335
File diff suppressed because it is too large
Load Diff
+5111
-4590
File diff suppressed because it is too large
Load Diff
Vendored
+274
-167
@@ -194,118 +194,120 @@ declare namespace ts {
|
||||
UnionType = 158,
|
||||
IntersectionType = 159,
|
||||
ParenthesizedType = 160,
|
||||
ObjectBindingPattern = 161,
|
||||
ArrayBindingPattern = 162,
|
||||
BindingElement = 163,
|
||||
ArrayLiteralExpression = 164,
|
||||
ObjectLiteralExpression = 165,
|
||||
PropertyAccessExpression = 166,
|
||||
ElementAccessExpression = 167,
|
||||
CallExpression = 168,
|
||||
NewExpression = 169,
|
||||
TaggedTemplateExpression = 170,
|
||||
TypeAssertionExpression = 171,
|
||||
ParenthesizedExpression = 172,
|
||||
FunctionExpression = 173,
|
||||
ArrowFunction = 174,
|
||||
DeleteExpression = 175,
|
||||
TypeOfExpression = 176,
|
||||
VoidExpression = 177,
|
||||
AwaitExpression = 178,
|
||||
PrefixUnaryExpression = 179,
|
||||
PostfixUnaryExpression = 180,
|
||||
BinaryExpression = 181,
|
||||
ConditionalExpression = 182,
|
||||
TemplateExpression = 183,
|
||||
YieldExpression = 184,
|
||||
SpreadElementExpression = 185,
|
||||
ClassExpression = 186,
|
||||
OmittedExpression = 187,
|
||||
ExpressionWithTypeArguments = 188,
|
||||
AsExpression = 189,
|
||||
TemplateSpan = 190,
|
||||
SemicolonClassElement = 191,
|
||||
Block = 192,
|
||||
VariableStatement = 193,
|
||||
EmptyStatement = 194,
|
||||
ExpressionStatement = 195,
|
||||
IfStatement = 196,
|
||||
DoStatement = 197,
|
||||
WhileStatement = 198,
|
||||
ForStatement = 199,
|
||||
ForInStatement = 200,
|
||||
ForOfStatement = 201,
|
||||
ContinueStatement = 202,
|
||||
BreakStatement = 203,
|
||||
ReturnStatement = 204,
|
||||
WithStatement = 205,
|
||||
SwitchStatement = 206,
|
||||
LabeledStatement = 207,
|
||||
ThrowStatement = 208,
|
||||
TryStatement = 209,
|
||||
DebuggerStatement = 210,
|
||||
VariableDeclaration = 211,
|
||||
VariableDeclarationList = 212,
|
||||
FunctionDeclaration = 213,
|
||||
ClassDeclaration = 214,
|
||||
InterfaceDeclaration = 215,
|
||||
TypeAliasDeclaration = 216,
|
||||
EnumDeclaration = 217,
|
||||
ModuleDeclaration = 218,
|
||||
ModuleBlock = 219,
|
||||
CaseBlock = 220,
|
||||
ImportEqualsDeclaration = 221,
|
||||
ImportDeclaration = 222,
|
||||
ImportClause = 223,
|
||||
NamespaceImport = 224,
|
||||
NamedImports = 225,
|
||||
ImportSpecifier = 226,
|
||||
ExportAssignment = 227,
|
||||
ExportDeclaration = 228,
|
||||
NamedExports = 229,
|
||||
ExportSpecifier = 230,
|
||||
MissingDeclaration = 231,
|
||||
ExternalModuleReference = 232,
|
||||
JsxElement = 233,
|
||||
JsxSelfClosingElement = 234,
|
||||
JsxOpeningElement = 235,
|
||||
JsxText = 236,
|
||||
JsxClosingElement = 237,
|
||||
JsxAttribute = 238,
|
||||
JsxSpreadAttribute = 239,
|
||||
JsxExpression = 240,
|
||||
CaseClause = 241,
|
||||
DefaultClause = 242,
|
||||
HeritageClause = 243,
|
||||
CatchClause = 244,
|
||||
PropertyAssignment = 245,
|
||||
ShorthandPropertyAssignment = 246,
|
||||
EnumMember = 247,
|
||||
SourceFile = 248,
|
||||
JSDocTypeExpression = 249,
|
||||
JSDocAllType = 250,
|
||||
JSDocUnknownType = 251,
|
||||
JSDocArrayType = 252,
|
||||
JSDocUnionType = 253,
|
||||
JSDocTupleType = 254,
|
||||
JSDocNullableType = 255,
|
||||
JSDocNonNullableType = 256,
|
||||
JSDocRecordType = 257,
|
||||
JSDocRecordMember = 258,
|
||||
JSDocTypeReference = 259,
|
||||
JSDocOptionalType = 260,
|
||||
JSDocFunctionType = 261,
|
||||
JSDocVariadicType = 262,
|
||||
JSDocConstructorType = 263,
|
||||
JSDocThisType = 264,
|
||||
JSDocComment = 265,
|
||||
JSDocTag = 266,
|
||||
JSDocParameterTag = 267,
|
||||
JSDocReturnTag = 268,
|
||||
JSDocTypeTag = 269,
|
||||
JSDocTemplateTag = 270,
|
||||
SyntaxList = 271,
|
||||
Count = 272,
|
||||
ThisType = 161,
|
||||
StringLiteralType = 162,
|
||||
ObjectBindingPattern = 163,
|
||||
ArrayBindingPattern = 164,
|
||||
BindingElement = 165,
|
||||
ArrayLiteralExpression = 166,
|
||||
ObjectLiteralExpression = 167,
|
||||
PropertyAccessExpression = 168,
|
||||
ElementAccessExpression = 169,
|
||||
CallExpression = 170,
|
||||
NewExpression = 171,
|
||||
TaggedTemplateExpression = 172,
|
||||
TypeAssertionExpression = 173,
|
||||
ParenthesizedExpression = 174,
|
||||
FunctionExpression = 175,
|
||||
ArrowFunction = 176,
|
||||
DeleteExpression = 177,
|
||||
TypeOfExpression = 178,
|
||||
VoidExpression = 179,
|
||||
AwaitExpression = 180,
|
||||
PrefixUnaryExpression = 181,
|
||||
PostfixUnaryExpression = 182,
|
||||
BinaryExpression = 183,
|
||||
ConditionalExpression = 184,
|
||||
TemplateExpression = 185,
|
||||
YieldExpression = 186,
|
||||
SpreadElementExpression = 187,
|
||||
ClassExpression = 188,
|
||||
OmittedExpression = 189,
|
||||
ExpressionWithTypeArguments = 190,
|
||||
AsExpression = 191,
|
||||
TemplateSpan = 192,
|
||||
SemicolonClassElement = 193,
|
||||
Block = 194,
|
||||
VariableStatement = 195,
|
||||
EmptyStatement = 196,
|
||||
ExpressionStatement = 197,
|
||||
IfStatement = 198,
|
||||
DoStatement = 199,
|
||||
WhileStatement = 200,
|
||||
ForStatement = 201,
|
||||
ForInStatement = 202,
|
||||
ForOfStatement = 203,
|
||||
ContinueStatement = 204,
|
||||
BreakStatement = 205,
|
||||
ReturnStatement = 206,
|
||||
WithStatement = 207,
|
||||
SwitchStatement = 208,
|
||||
LabeledStatement = 209,
|
||||
ThrowStatement = 210,
|
||||
TryStatement = 211,
|
||||
DebuggerStatement = 212,
|
||||
VariableDeclaration = 213,
|
||||
VariableDeclarationList = 214,
|
||||
FunctionDeclaration = 215,
|
||||
ClassDeclaration = 216,
|
||||
InterfaceDeclaration = 217,
|
||||
TypeAliasDeclaration = 218,
|
||||
EnumDeclaration = 219,
|
||||
ModuleDeclaration = 220,
|
||||
ModuleBlock = 221,
|
||||
CaseBlock = 222,
|
||||
ImportEqualsDeclaration = 223,
|
||||
ImportDeclaration = 224,
|
||||
ImportClause = 225,
|
||||
NamespaceImport = 226,
|
||||
NamedImports = 227,
|
||||
ImportSpecifier = 228,
|
||||
ExportAssignment = 229,
|
||||
ExportDeclaration = 230,
|
||||
NamedExports = 231,
|
||||
ExportSpecifier = 232,
|
||||
MissingDeclaration = 233,
|
||||
ExternalModuleReference = 234,
|
||||
JsxElement = 235,
|
||||
JsxSelfClosingElement = 236,
|
||||
JsxOpeningElement = 237,
|
||||
JsxText = 238,
|
||||
JsxClosingElement = 239,
|
||||
JsxAttribute = 240,
|
||||
JsxSpreadAttribute = 241,
|
||||
JsxExpression = 242,
|
||||
CaseClause = 243,
|
||||
DefaultClause = 244,
|
||||
HeritageClause = 245,
|
||||
CatchClause = 246,
|
||||
PropertyAssignment = 247,
|
||||
ShorthandPropertyAssignment = 248,
|
||||
EnumMember = 249,
|
||||
SourceFile = 250,
|
||||
JSDocTypeExpression = 251,
|
||||
JSDocAllType = 252,
|
||||
JSDocUnknownType = 253,
|
||||
JSDocArrayType = 254,
|
||||
JSDocUnionType = 255,
|
||||
JSDocTupleType = 256,
|
||||
JSDocNullableType = 257,
|
||||
JSDocNonNullableType = 258,
|
||||
JSDocRecordType = 259,
|
||||
JSDocRecordMember = 260,
|
||||
JSDocTypeReference = 261,
|
||||
JSDocOptionalType = 262,
|
||||
JSDocFunctionType = 263,
|
||||
JSDocVariadicType = 264,
|
||||
JSDocConstructorType = 265,
|
||||
JSDocThisType = 266,
|
||||
JSDocComment = 267,
|
||||
JSDocTag = 268,
|
||||
JSDocParameterTag = 269,
|
||||
JSDocReturnTag = 270,
|
||||
JSDocTypeTag = 271,
|
||||
JSDocTemplateTag = 272,
|
||||
SyntaxList = 273,
|
||||
Count = 274,
|
||||
FirstAssignment = 56,
|
||||
LastAssignment = 68,
|
||||
FirstReservedWord = 70,
|
||||
@@ -314,8 +316,8 @@ declare namespace ts {
|
||||
LastKeyword = 134,
|
||||
FirstFutureReservedWord = 106,
|
||||
LastFutureReservedWord = 114,
|
||||
FirstTypeNode = 151,
|
||||
LastTypeNode = 160,
|
||||
FirstTypeNode = 150,
|
||||
LastTypeNode = 162,
|
||||
FirstPunctuation = 15,
|
||||
LastPunctuation = 68,
|
||||
FirstToken = 0,
|
||||
@@ -359,10 +361,14 @@ declare namespace ts {
|
||||
}
|
||||
enum JsxFlags {
|
||||
None = 0,
|
||||
/** An element from a named property of the JSX.IntrinsicElements interface */
|
||||
IntrinsicNamedElement = 1,
|
||||
/** An element inferred from the string index signature of the JSX.IntrinsicElements interface */
|
||||
IntrinsicIndexedElement = 2,
|
||||
ClassElement = 4,
|
||||
UnknownElement = 8,
|
||||
/** An element backed by a class, class-like, or function value */
|
||||
ValueElement = 4,
|
||||
/** Element resolution failed */
|
||||
UnknownElement = 16,
|
||||
IntrinsicElement = 3,
|
||||
}
|
||||
interface Node extends TextRange {
|
||||
@@ -375,9 +381,11 @@ declare namespace ts {
|
||||
interface NodeArray<T> extends Array<T>, TextRange {
|
||||
hasTrailingComma?: boolean;
|
||||
}
|
||||
interface ModifiersArray extends NodeArray<Node> {
|
||||
interface ModifiersArray extends NodeArray<Modifier> {
|
||||
flags: number;
|
||||
}
|
||||
interface Modifier extends Node {
|
||||
}
|
||||
interface Identifier extends PrimaryExpression {
|
||||
text: string;
|
||||
originalKeywordKind?: SyntaxKind;
|
||||
@@ -393,6 +401,9 @@ declare namespace ts {
|
||||
_declarationBrand: any;
|
||||
name?: DeclarationName;
|
||||
}
|
||||
interface DeclarationStatement extends Declaration, Statement {
|
||||
name?: Identifier;
|
||||
}
|
||||
interface ComputedPropertyName extends Node {
|
||||
expression: Expression;
|
||||
}
|
||||
@@ -405,10 +416,15 @@ declare namespace ts {
|
||||
expression?: Expression;
|
||||
}
|
||||
interface SignatureDeclaration extends Declaration {
|
||||
name?: PropertyName;
|
||||
typeParameters?: NodeArray<TypeParameterDeclaration>;
|
||||
parameters: NodeArray<ParameterDeclaration>;
|
||||
type?: TypeNode;
|
||||
}
|
||||
interface CallSignatureDeclaration extends SignatureDeclaration, TypeElement {
|
||||
}
|
||||
interface ConstructSignatureDeclaration extends SignatureDeclaration, TypeElement {
|
||||
}
|
||||
interface VariableDeclaration extends Declaration {
|
||||
parent?: VariableDeclarationList;
|
||||
name: Identifier | BindingPattern;
|
||||
@@ -431,18 +447,25 @@ declare namespace ts {
|
||||
name: Identifier | BindingPattern;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface PropertyDeclaration extends Declaration, ClassElement {
|
||||
name: DeclarationName;
|
||||
interface PropertySignature extends TypeElement {
|
||||
name: PropertyName;
|
||||
questionToken?: Node;
|
||||
type?: TypeNode;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface PropertyDeclaration extends ClassElement {
|
||||
questionToken?: Node;
|
||||
name: PropertyName;
|
||||
type?: TypeNode;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface ObjectLiteralElement extends Declaration {
|
||||
_objectLiteralBrandBrand: any;
|
||||
name?: PropertyName;
|
||||
}
|
||||
interface PropertyAssignment extends ObjectLiteralElement {
|
||||
_propertyAssignmentBrand: any;
|
||||
name: DeclarationName;
|
||||
name: PropertyName;
|
||||
questionToken?: Node;
|
||||
initializer: Expression;
|
||||
}
|
||||
@@ -460,9 +483,16 @@ declare namespace ts {
|
||||
type?: TypeNode;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface PropertyLikeDeclaration extends Declaration {
|
||||
name: PropertyName;
|
||||
}
|
||||
interface BindingPattern extends Node {
|
||||
elements: NodeArray<BindingElement>;
|
||||
}
|
||||
interface ObjectBindingPattern extends BindingPattern {
|
||||
}
|
||||
interface ArrayBindingPattern extends BindingPattern {
|
||||
}
|
||||
/**
|
||||
* Several node kinds share function-like features such as a signature,
|
||||
* a name, and a body. These nodes should extend FunctionLikeDeclaration.
|
||||
@@ -477,45 +507,61 @@ declare namespace ts {
|
||||
questionToken?: Node;
|
||||
body?: Block | Expression;
|
||||
}
|
||||
interface FunctionDeclaration extends FunctionLikeDeclaration, Statement {
|
||||
interface FunctionDeclaration extends FunctionLikeDeclaration, DeclarationStatement {
|
||||
name?: Identifier;
|
||||
body?: Block;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
interface MethodSignature extends SignatureDeclaration, TypeElement {
|
||||
name: PropertyName;
|
||||
}
|
||||
interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
|
||||
body?: Block;
|
||||
name: PropertyName;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement {
|
||||
body?: Block;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
interface SemicolonClassElement extends ClassElement {
|
||||
_semicolonClassElementBrand: any;
|
||||
}
|
||||
interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
|
||||
_accessorDeclarationBrand: any;
|
||||
body: Block;
|
||||
name: PropertyName;
|
||||
body: FunctionBody;
|
||||
}
|
||||
interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement {
|
||||
interface GetAccessorDeclaration extends AccessorDeclaration {
|
||||
}
|
||||
interface SetAccessorDeclaration extends AccessorDeclaration {
|
||||
}
|
||||
interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement, TypeElement {
|
||||
_indexSignatureDeclarationBrand: any;
|
||||
}
|
||||
interface TypeNode extends Node {
|
||||
_typeNodeBrand: any;
|
||||
}
|
||||
interface ThisTypeNode extends TypeNode {
|
||||
_thisTypeNodeBrand: any;
|
||||
}
|
||||
interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration {
|
||||
_functionOrConstructorTypeNodeBrand: any;
|
||||
}
|
||||
interface FunctionTypeNode extends FunctionOrConstructorTypeNode {
|
||||
}
|
||||
interface ConstructorTypeNode extends FunctionOrConstructorTypeNode {
|
||||
}
|
||||
interface TypeReferenceNode extends TypeNode {
|
||||
typeName: EntityName;
|
||||
typeArguments?: NodeArray<TypeNode>;
|
||||
}
|
||||
interface TypePredicateNode extends TypeNode {
|
||||
parameterName: Identifier;
|
||||
parameterName: Identifier | ThisTypeNode;
|
||||
type: TypeNode;
|
||||
}
|
||||
interface TypeQueryNode extends TypeNode {
|
||||
exprName: EntityName;
|
||||
}
|
||||
interface TypeLiteralNode extends TypeNode, Declaration {
|
||||
members: NodeArray<Node>;
|
||||
members: NodeArray<TypeElement>;
|
||||
}
|
||||
interface ArrayTypeNode extends TypeNode {
|
||||
elementType: TypeNode;
|
||||
@@ -533,13 +579,18 @@ declare namespace ts {
|
||||
interface ParenthesizedTypeNode extends TypeNode {
|
||||
type: TypeNode;
|
||||
}
|
||||
interface StringLiteral extends LiteralExpression, TypeNode {
|
||||
interface StringLiteralTypeNode extends LiteralLikeNode, TypeNode {
|
||||
_stringLiteralTypeBrand: any;
|
||||
}
|
||||
interface StringLiteral extends LiteralExpression {
|
||||
_stringLiteralBrand: any;
|
||||
}
|
||||
interface Expression extends Node {
|
||||
_expressionBrand: any;
|
||||
contextualType?: Type;
|
||||
}
|
||||
interface OmittedExpression extends Expression {
|
||||
}
|
||||
interface UnaryExpression extends Expression {
|
||||
_unaryExpressionBrand: any;
|
||||
}
|
||||
@@ -594,25 +645,34 @@ declare namespace ts {
|
||||
colonToken: Node;
|
||||
whenFalse: Expression;
|
||||
}
|
||||
type FunctionBody = Block;
|
||||
type ConciseBody = FunctionBody | Expression;
|
||||
interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration {
|
||||
name?: Identifier;
|
||||
body: Block | Expression;
|
||||
body: FunctionBody;
|
||||
}
|
||||
interface ArrowFunction extends Expression, FunctionLikeDeclaration {
|
||||
equalsGreaterThanToken: Node;
|
||||
body: ConciseBody;
|
||||
}
|
||||
interface LiteralExpression extends PrimaryExpression {
|
||||
interface LiteralLikeNode extends Node {
|
||||
text: string;
|
||||
isUnterminated?: boolean;
|
||||
hasExtendedUnicodeEscape?: boolean;
|
||||
}
|
||||
interface LiteralExpression extends LiteralLikeNode, PrimaryExpression {
|
||||
_literalExpressionBrand: any;
|
||||
}
|
||||
interface TemplateLiteralFragment extends LiteralLikeNode {
|
||||
_templateLiteralFragmentBrand: any;
|
||||
}
|
||||
interface TemplateExpression extends PrimaryExpression {
|
||||
head: LiteralExpression;
|
||||
head: TemplateLiteralFragment;
|
||||
templateSpans: NodeArray<TemplateSpan>;
|
||||
}
|
||||
interface TemplateSpan extends Node {
|
||||
expression: Expression;
|
||||
literal: LiteralExpression;
|
||||
literal: TemplateLiteralFragment;
|
||||
}
|
||||
interface ParenthesizedExpression extends PrimaryExpression {
|
||||
expression: Expression;
|
||||
@@ -694,6 +754,14 @@ declare namespace ts {
|
||||
interface Statement extends Node {
|
||||
_statementBrand: any;
|
||||
}
|
||||
interface EmptyStatement extends Statement {
|
||||
}
|
||||
interface DebuggerStatement extends Statement {
|
||||
}
|
||||
interface MissingDeclaration extends DeclarationStatement, ClassElement, ObjectLiteralElement, TypeElement {
|
||||
name?: Identifier;
|
||||
}
|
||||
type BlockLike = SourceFile | Block | ModuleBlock | CaseClause;
|
||||
interface Block extends Statement {
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
@@ -730,9 +798,13 @@ declare namespace ts {
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
expression: Expression;
|
||||
}
|
||||
interface BreakOrContinueStatement extends Statement {
|
||||
interface BreakStatement extends Statement {
|
||||
label?: Identifier;
|
||||
}
|
||||
interface ContinueStatement extends Statement {
|
||||
label?: Identifier;
|
||||
}
|
||||
type BreakOrContinueStatement = BreakStatement | ContinueStatement;
|
||||
interface ReturnStatement extends Statement {
|
||||
expression?: Expression;
|
||||
}
|
||||
@@ -748,7 +820,7 @@ declare namespace ts {
|
||||
clauses: NodeArray<CaseOrDefaultClause>;
|
||||
}
|
||||
interface CaseClause extends Node {
|
||||
expression?: Expression;
|
||||
expression: Expression;
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
interface DefaultClause extends Node {
|
||||
@@ -777,24 +849,31 @@ declare namespace ts {
|
||||
heritageClauses?: NodeArray<HeritageClause>;
|
||||
members: NodeArray<ClassElement>;
|
||||
}
|
||||
interface ClassDeclaration extends ClassLikeDeclaration, Statement {
|
||||
interface ClassDeclaration extends ClassLikeDeclaration, DeclarationStatement {
|
||||
name?: Identifier;
|
||||
}
|
||||
interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression {
|
||||
}
|
||||
interface ClassElement extends Declaration {
|
||||
_classElementBrand: any;
|
||||
name?: PropertyName;
|
||||
}
|
||||
interface InterfaceDeclaration extends Declaration, Statement {
|
||||
interface TypeElement extends Declaration {
|
||||
_typeElementBrand: any;
|
||||
name?: PropertyName;
|
||||
questionToken?: Node;
|
||||
}
|
||||
interface InterfaceDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
typeParameters?: NodeArray<TypeParameterDeclaration>;
|
||||
heritageClauses?: NodeArray<HeritageClause>;
|
||||
members: NodeArray<Declaration>;
|
||||
members: NodeArray<TypeElement>;
|
||||
}
|
||||
interface HeritageClause extends Node {
|
||||
token: SyntaxKind;
|
||||
types?: NodeArray<ExpressionWithTypeArguments>;
|
||||
}
|
||||
interface TypeAliasDeclaration extends Declaration, Statement {
|
||||
interface TypeAliasDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
typeParameters?: NodeArray<TypeParameterDeclaration>;
|
||||
type: TypeNode;
|
||||
@@ -803,18 +882,19 @@ declare namespace ts {
|
||||
name: DeclarationName;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface EnumDeclaration extends Declaration, Statement {
|
||||
interface EnumDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
members: NodeArray<EnumMember>;
|
||||
}
|
||||
interface ModuleDeclaration extends Declaration, Statement {
|
||||
type ModuleBody = ModuleBlock | ModuleDeclaration;
|
||||
interface ModuleDeclaration extends DeclarationStatement {
|
||||
name: Identifier | LiteralExpression;
|
||||
body: ModuleBlock | ModuleDeclaration;
|
||||
}
|
||||
interface ModuleBlock extends Node, Statement {
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
interface ImportEqualsDeclaration extends Declaration, Statement {
|
||||
interface ImportEqualsDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
moduleReference: EntityName | ExternalModuleReference;
|
||||
}
|
||||
@@ -832,22 +912,27 @@ declare namespace ts {
|
||||
interface NamespaceImport extends Declaration {
|
||||
name: Identifier;
|
||||
}
|
||||
interface ExportDeclaration extends Declaration, Statement {
|
||||
interface ExportDeclaration extends DeclarationStatement {
|
||||
exportClause?: NamedExports;
|
||||
moduleSpecifier?: Expression;
|
||||
}
|
||||
interface NamedImportsOrExports extends Node {
|
||||
elements: NodeArray<ImportOrExportSpecifier>;
|
||||
interface NamedImports extends Node {
|
||||
elements: NodeArray<ImportSpecifier>;
|
||||
}
|
||||
type NamedImports = NamedImportsOrExports;
|
||||
type NamedExports = NamedImportsOrExports;
|
||||
interface ImportOrExportSpecifier extends Declaration {
|
||||
interface NamedExports extends Node {
|
||||
elements: NodeArray<ExportSpecifier>;
|
||||
}
|
||||
type NamedImportsOrExports = NamedImports | NamedExports;
|
||||
interface ImportSpecifier extends Declaration {
|
||||
propertyName?: Identifier;
|
||||
name: Identifier;
|
||||
}
|
||||
type ImportSpecifier = ImportOrExportSpecifier;
|
||||
type ExportSpecifier = ImportOrExportSpecifier;
|
||||
interface ExportAssignment extends Declaration, Statement {
|
||||
interface ExportSpecifier extends Declaration {
|
||||
propertyName?: Identifier;
|
||||
name: Identifier;
|
||||
}
|
||||
type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;
|
||||
interface ExportAssignment extends DeclarationStatement {
|
||||
isExportEquals?: boolean;
|
||||
expression: Expression;
|
||||
}
|
||||
@@ -908,7 +993,7 @@ declare namespace ts {
|
||||
interface JSDocThisType extends JSDocType {
|
||||
type: JSDocType;
|
||||
}
|
||||
interface JSDocRecordMember extends PropertyDeclaration {
|
||||
interface JSDocRecordMember extends PropertySignature {
|
||||
name: Identifier | LiteralExpression;
|
||||
type?: JSDocType;
|
||||
}
|
||||
@@ -934,16 +1019,17 @@ declare namespace ts {
|
||||
postParameterName?: Identifier;
|
||||
isBracketed: boolean;
|
||||
}
|
||||
interface AmdDependency {
|
||||
path: string;
|
||||
name: string;
|
||||
}
|
||||
interface SourceFile extends Declaration {
|
||||
statements: NodeArray<Statement>;
|
||||
endOfFileToken: Node;
|
||||
fileName: string;
|
||||
path: Path;
|
||||
text: string;
|
||||
amdDependencies: {
|
||||
path: string;
|
||||
name: string;
|
||||
}[];
|
||||
amdDependencies: AmdDependency[];
|
||||
moduleName: string;
|
||||
referencedFiles: FileReference[];
|
||||
languageVariant: LanguageVariant;
|
||||
@@ -1053,6 +1139,7 @@ declare namespace ts {
|
||||
getReturnTypeOfSignature(signature: Signature): Type;
|
||||
getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
|
||||
getSymbolAtLocation(node: Node): Symbol;
|
||||
getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
|
||||
getShorthandAssignmentValueSymbol(location: Node): Symbol;
|
||||
getTypeAtLocation(node: Node): Type;
|
||||
typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
|
||||
@@ -1078,7 +1165,7 @@ declare namespace ts {
|
||||
interface SymbolDisplayBuilder {
|
||||
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void;
|
||||
buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): void;
|
||||
buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void;
|
||||
@@ -1117,10 +1204,20 @@ declare namespace ts {
|
||||
WriteTypeParametersOrArguments = 1,
|
||||
UseOnlyExternalAliasing = 2,
|
||||
}
|
||||
enum TypePredicateKind {
|
||||
This = 0,
|
||||
Identifier = 1,
|
||||
}
|
||||
interface TypePredicate {
|
||||
kind: TypePredicateKind;
|
||||
type: Type;
|
||||
}
|
||||
interface ThisTypePredicate extends TypePredicate {
|
||||
_thisTypePredicateBrand: any;
|
||||
}
|
||||
interface IdentifierTypePredicate extends TypePredicate {
|
||||
parameterName: string;
|
||||
parameterIndex: number;
|
||||
type: Type;
|
||||
}
|
||||
enum SymbolFlags {
|
||||
None = 0,
|
||||
@@ -1222,6 +1319,7 @@ declare namespace ts {
|
||||
ESSymbol = 16777216,
|
||||
ThisType = 33554432,
|
||||
ObjectLiteralPatternWithComputedProperties = 67108864,
|
||||
PredicateType = 134217728,
|
||||
StringLike = 258,
|
||||
NumberLike = 132,
|
||||
ObjectType = 80896,
|
||||
@@ -1234,6 +1332,9 @@ declare namespace ts {
|
||||
symbol?: Symbol;
|
||||
pattern?: DestructuringPattern;
|
||||
}
|
||||
interface PredicateType extends Type {
|
||||
predicate: ThisTypePredicate | IdentifierTypePredicate;
|
||||
}
|
||||
interface StringLiteralType extends Type {
|
||||
text: string;
|
||||
}
|
||||
@@ -1279,7 +1380,6 @@ declare namespace ts {
|
||||
declaration: SignatureDeclaration;
|
||||
typeParameters: TypeParameter[];
|
||||
parameters: Symbol[];
|
||||
typePredicate?: TypePredicate;
|
||||
}
|
||||
enum IndexKind {
|
||||
String = 0,
|
||||
@@ -1331,6 +1431,7 @@ declare namespace ts {
|
||||
inlineSourceMap?: boolean;
|
||||
inlineSources?: boolean;
|
||||
jsx?: JsxEmit;
|
||||
reactNamespace?: string;
|
||||
listFiles?: boolean;
|
||||
locale?: string;
|
||||
mapRoot?: string;
|
||||
@@ -1366,6 +1467,8 @@ declare namespace ts {
|
||||
noImplicitReturns?: boolean;
|
||||
noFallthroughCasesInSwitch?: boolean;
|
||||
forceConsistentCasingInFileNames?: boolean;
|
||||
allowSyntheticDefaultImports?: boolean;
|
||||
allowJs?: boolean;
|
||||
[option: string]: string | number | boolean;
|
||||
}
|
||||
enum ModuleKind {
|
||||
@@ -1409,6 +1512,7 @@ declare namespace ts {
|
||||
interface ModuleResolutionHost {
|
||||
fileExists(fileName: string): boolean;
|
||||
readFile(fileName: string): string;
|
||||
directoryExists?(directoryName: string): boolean;
|
||||
}
|
||||
interface ResolvedModule {
|
||||
resolvedFileName: string;
|
||||
@@ -1537,6 +1641,7 @@ declare namespace ts {
|
||||
*/
|
||||
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
|
||||
function getTypeParameterOwner(d: Declaration): Declaration;
|
||||
function isParameterPropertyDeclaration(node: ParameterDeclaration): boolean;
|
||||
}
|
||||
declare namespace ts {
|
||||
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
|
||||
@@ -1546,10 +1651,10 @@ declare namespace ts {
|
||||
}
|
||||
declare namespace ts {
|
||||
const version: string;
|
||||
function findConfigFile(searchPath: string): string;
|
||||
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean): string;
|
||||
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
|
||||
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function nodeModuleNameResolver(moduleName: string, containingFile: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
|
||||
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
|
||||
@@ -1582,7 +1687,7 @@ declare namespace ts {
|
||||
* @param basePath A root directory to resolve relative path entries in the config
|
||||
* file to. e.g. outDir
|
||||
*/
|
||||
function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine;
|
||||
function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions): ParsedCommandLine;
|
||||
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string): {
|
||||
options: CompilerOptions;
|
||||
errors: Diagnostic[];
|
||||
@@ -1590,7 +1695,7 @@ declare namespace ts {
|
||||
}
|
||||
declare namespace ts {
|
||||
/** The version of the language service API */
|
||||
let servicesVersion: string;
|
||||
const servicesVersion: string;
|
||||
interface Node {
|
||||
getSourceFile(): SourceFile;
|
||||
getChildCount(sourceFile?: SourceFile): number;
|
||||
@@ -1659,7 +1764,7 @@ declare namespace ts {
|
||||
/** Releases all resources held by this script snapshot */
|
||||
dispose?(): void;
|
||||
}
|
||||
module ScriptSnapshot {
|
||||
namespace ScriptSnapshot {
|
||||
function fromString(text: string): IScriptSnapshot;
|
||||
}
|
||||
interface PreProcessedFileInfo {
|
||||
@@ -1687,6 +1792,7 @@ declare namespace ts {
|
||||
error?(s: string): void;
|
||||
useCaseSensitiveFileNames?(): boolean;
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[];
|
||||
directoryExists?(directoryName: string): boolean;
|
||||
}
|
||||
interface LanguageService {
|
||||
cleanupSemanticCache(): void;
|
||||
@@ -1782,7 +1888,7 @@ declare namespace ts {
|
||||
fileName: string;
|
||||
highlightSpans: HighlightSpan[];
|
||||
}
|
||||
module HighlightSpanKind {
|
||||
namespace HighlightSpanKind {
|
||||
const none: string;
|
||||
const definition: string;
|
||||
const reference: string;
|
||||
@@ -1824,6 +1930,7 @@ declare namespace ts {
|
||||
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
|
||||
PlaceOpenBraceOnNewLineForFunctions: boolean;
|
||||
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
|
||||
[s: string]: boolean | number | string;
|
||||
@@ -2068,7 +2175,7 @@ declare namespace ts {
|
||||
releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
|
||||
reportStats(): string;
|
||||
}
|
||||
module ScriptElementKind {
|
||||
namespace ScriptElementKind {
|
||||
const unknown: string;
|
||||
const warning: string;
|
||||
const keyword: string;
|
||||
@@ -2099,7 +2206,7 @@ declare namespace ts {
|
||||
const constElement: string;
|
||||
const letElement: string;
|
||||
}
|
||||
module ScriptElementKindModifier {
|
||||
namespace ScriptElementKindModifier {
|
||||
const none: string;
|
||||
const publicMemberModifier: string;
|
||||
const privateMemberModifier: string;
|
||||
|
||||
+5708
-4963
File diff suppressed because it is too large
Load Diff
Vendored
+274
-167
@@ -194,118 +194,120 @@ declare namespace ts {
|
||||
UnionType = 158,
|
||||
IntersectionType = 159,
|
||||
ParenthesizedType = 160,
|
||||
ObjectBindingPattern = 161,
|
||||
ArrayBindingPattern = 162,
|
||||
BindingElement = 163,
|
||||
ArrayLiteralExpression = 164,
|
||||
ObjectLiteralExpression = 165,
|
||||
PropertyAccessExpression = 166,
|
||||
ElementAccessExpression = 167,
|
||||
CallExpression = 168,
|
||||
NewExpression = 169,
|
||||
TaggedTemplateExpression = 170,
|
||||
TypeAssertionExpression = 171,
|
||||
ParenthesizedExpression = 172,
|
||||
FunctionExpression = 173,
|
||||
ArrowFunction = 174,
|
||||
DeleteExpression = 175,
|
||||
TypeOfExpression = 176,
|
||||
VoidExpression = 177,
|
||||
AwaitExpression = 178,
|
||||
PrefixUnaryExpression = 179,
|
||||
PostfixUnaryExpression = 180,
|
||||
BinaryExpression = 181,
|
||||
ConditionalExpression = 182,
|
||||
TemplateExpression = 183,
|
||||
YieldExpression = 184,
|
||||
SpreadElementExpression = 185,
|
||||
ClassExpression = 186,
|
||||
OmittedExpression = 187,
|
||||
ExpressionWithTypeArguments = 188,
|
||||
AsExpression = 189,
|
||||
TemplateSpan = 190,
|
||||
SemicolonClassElement = 191,
|
||||
Block = 192,
|
||||
VariableStatement = 193,
|
||||
EmptyStatement = 194,
|
||||
ExpressionStatement = 195,
|
||||
IfStatement = 196,
|
||||
DoStatement = 197,
|
||||
WhileStatement = 198,
|
||||
ForStatement = 199,
|
||||
ForInStatement = 200,
|
||||
ForOfStatement = 201,
|
||||
ContinueStatement = 202,
|
||||
BreakStatement = 203,
|
||||
ReturnStatement = 204,
|
||||
WithStatement = 205,
|
||||
SwitchStatement = 206,
|
||||
LabeledStatement = 207,
|
||||
ThrowStatement = 208,
|
||||
TryStatement = 209,
|
||||
DebuggerStatement = 210,
|
||||
VariableDeclaration = 211,
|
||||
VariableDeclarationList = 212,
|
||||
FunctionDeclaration = 213,
|
||||
ClassDeclaration = 214,
|
||||
InterfaceDeclaration = 215,
|
||||
TypeAliasDeclaration = 216,
|
||||
EnumDeclaration = 217,
|
||||
ModuleDeclaration = 218,
|
||||
ModuleBlock = 219,
|
||||
CaseBlock = 220,
|
||||
ImportEqualsDeclaration = 221,
|
||||
ImportDeclaration = 222,
|
||||
ImportClause = 223,
|
||||
NamespaceImport = 224,
|
||||
NamedImports = 225,
|
||||
ImportSpecifier = 226,
|
||||
ExportAssignment = 227,
|
||||
ExportDeclaration = 228,
|
||||
NamedExports = 229,
|
||||
ExportSpecifier = 230,
|
||||
MissingDeclaration = 231,
|
||||
ExternalModuleReference = 232,
|
||||
JsxElement = 233,
|
||||
JsxSelfClosingElement = 234,
|
||||
JsxOpeningElement = 235,
|
||||
JsxText = 236,
|
||||
JsxClosingElement = 237,
|
||||
JsxAttribute = 238,
|
||||
JsxSpreadAttribute = 239,
|
||||
JsxExpression = 240,
|
||||
CaseClause = 241,
|
||||
DefaultClause = 242,
|
||||
HeritageClause = 243,
|
||||
CatchClause = 244,
|
||||
PropertyAssignment = 245,
|
||||
ShorthandPropertyAssignment = 246,
|
||||
EnumMember = 247,
|
||||
SourceFile = 248,
|
||||
JSDocTypeExpression = 249,
|
||||
JSDocAllType = 250,
|
||||
JSDocUnknownType = 251,
|
||||
JSDocArrayType = 252,
|
||||
JSDocUnionType = 253,
|
||||
JSDocTupleType = 254,
|
||||
JSDocNullableType = 255,
|
||||
JSDocNonNullableType = 256,
|
||||
JSDocRecordType = 257,
|
||||
JSDocRecordMember = 258,
|
||||
JSDocTypeReference = 259,
|
||||
JSDocOptionalType = 260,
|
||||
JSDocFunctionType = 261,
|
||||
JSDocVariadicType = 262,
|
||||
JSDocConstructorType = 263,
|
||||
JSDocThisType = 264,
|
||||
JSDocComment = 265,
|
||||
JSDocTag = 266,
|
||||
JSDocParameterTag = 267,
|
||||
JSDocReturnTag = 268,
|
||||
JSDocTypeTag = 269,
|
||||
JSDocTemplateTag = 270,
|
||||
SyntaxList = 271,
|
||||
Count = 272,
|
||||
ThisType = 161,
|
||||
StringLiteralType = 162,
|
||||
ObjectBindingPattern = 163,
|
||||
ArrayBindingPattern = 164,
|
||||
BindingElement = 165,
|
||||
ArrayLiteralExpression = 166,
|
||||
ObjectLiteralExpression = 167,
|
||||
PropertyAccessExpression = 168,
|
||||
ElementAccessExpression = 169,
|
||||
CallExpression = 170,
|
||||
NewExpression = 171,
|
||||
TaggedTemplateExpression = 172,
|
||||
TypeAssertionExpression = 173,
|
||||
ParenthesizedExpression = 174,
|
||||
FunctionExpression = 175,
|
||||
ArrowFunction = 176,
|
||||
DeleteExpression = 177,
|
||||
TypeOfExpression = 178,
|
||||
VoidExpression = 179,
|
||||
AwaitExpression = 180,
|
||||
PrefixUnaryExpression = 181,
|
||||
PostfixUnaryExpression = 182,
|
||||
BinaryExpression = 183,
|
||||
ConditionalExpression = 184,
|
||||
TemplateExpression = 185,
|
||||
YieldExpression = 186,
|
||||
SpreadElementExpression = 187,
|
||||
ClassExpression = 188,
|
||||
OmittedExpression = 189,
|
||||
ExpressionWithTypeArguments = 190,
|
||||
AsExpression = 191,
|
||||
TemplateSpan = 192,
|
||||
SemicolonClassElement = 193,
|
||||
Block = 194,
|
||||
VariableStatement = 195,
|
||||
EmptyStatement = 196,
|
||||
ExpressionStatement = 197,
|
||||
IfStatement = 198,
|
||||
DoStatement = 199,
|
||||
WhileStatement = 200,
|
||||
ForStatement = 201,
|
||||
ForInStatement = 202,
|
||||
ForOfStatement = 203,
|
||||
ContinueStatement = 204,
|
||||
BreakStatement = 205,
|
||||
ReturnStatement = 206,
|
||||
WithStatement = 207,
|
||||
SwitchStatement = 208,
|
||||
LabeledStatement = 209,
|
||||
ThrowStatement = 210,
|
||||
TryStatement = 211,
|
||||
DebuggerStatement = 212,
|
||||
VariableDeclaration = 213,
|
||||
VariableDeclarationList = 214,
|
||||
FunctionDeclaration = 215,
|
||||
ClassDeclaration = 216,
|
||||
InterfaceDeclaration = 217,
|
||||
TypeAliasDeclaration = 218,
|
||||
EnumDeclaration = 219,
|
||||
ModuleDeclaration = 220,
|
||||
ModuleBlock = 221,
|
||||
CaseBlock = 222,
|
||||
ImportEqualsDeclaration = 223,
|
||||
ImportDeclaration = 224,
|
||||
ImportClause = 225,
|
||||
NamespaceImport = 226,
|
||||
NamedImports = 227,
|
||||
ImportSpecifier = 228,
|
||||
ExportAssignment = 229,
|
||||
ExportDeclaration = 230,
|
||||
NamedExports = 231,
|
||||
ExportSpecifier = 232,
|
||||
MissingDeclaration = 233,
|
||||
ExternalModuleReference = 234,
|
||||
JsxElement = 235,
|
||||
JsxSelfClosingElement = 236,
|
||||
JsxOpeningElement = 237,
|
||||
JsxText = 238,
|
||||
JsxClosingElement = 239,
|
||||
JsxAttribute = 240,
|
||||
JsxSpreadAttribute = 241,
|
||||
JsxExpression = 242,
|
||||
CaseClause = 243,
|
||||
DefaultClause = 244,
|
||||
HeritageClause = 245,
|
||||
CatchClause = 246,
|
||||
PropertyAssignment = 247,
|
||||
ShorthandPropertyAssignment = 248,
|
||||
EnumMember = 249,
|
||||
SourceFile = 250,
|
||||
JSDocTypeExpression = 251,
|
||||
JSDocAllType = 252,
|
||||
JSDocUnknownType = 253,
|
||||
JSDocArrayType = 254,
|
||||
JSDocUnionType = 255,
|
||||
JSDocTupleType = 256,
|
||||
JSDocNullableType = 257,
|
||||
JSDocNonNullableType = 258,
|
||||
JSDocRecordType = 259,
|
||||
JSDocRecordMember = 260,
|
||||
JSDocTypeReference = 261,
|
||||
JSDocOptionalType = 262,
|
||||
JSDocFunctionType = 263,
|
||||
JSDocVariadicType = 264,
|
||||
JSDocConstructorType = 265,
|
||||
JSDocThisType = 266,
|
||||
JSDocComment = 267,
|
||||
JSDocTag = 268,
|
||||
JSDocParameterTag = 269,
|
||||
JSDocReturnTag = 270,
|
||||
JSDocTypeTag = 271,
|
||||
JSDocTemplateTag = 272,
|
||||
SyntaxList = 273,
|
||||
Count = 274,
|
||||
FirstAssignment = 56,
|
||||
LastAssignment = 68,
|
||||
FirstReservedWord = 70,
|
||||
@@ -314,8 +316,8 @@ declare namespace ts {
|
||||
LastKeyword = 134,
|
||||
FirstFutureReservedWord = 106,
|
||||
LastFutureReservedWord = 114,
|
||||
FirstTypeNode = 151,
|
||||
LastTypeNode = 160,
|
||||
FirstTypeNode = 150,
|
||||
LastTypeNode = 162,
|
||||
FirstPunctuation = 15,
|
||||
LastPunctuation = 68,
|
||||
FirstToken = 0,
|
||||
@@ -359,10 +361,14 @@ declare namespace ts {
|
||||
}
|
||||
enum JsxFlags {
|
||||
None = 0,
|
||||
/** An element from a named property of the JSX.IntrinsicElements interface */
|
||||
IntrinsicNamedElement = 1,
|
||||
/** An element inferred from the string index signature of the JSX.IntrinsicElements interface */
|
||||
IntrinsicIndexedElement = 2,
|
||||
ClassElement = 4,
|
||||
UnknownElement = 8,
|
||||
/** An element backed by a class, class-like, or function value */
|
||||
ValueElement = 4,
|
||||
/** Element resolution failed */
|
||||
UnknownElement = 16,
|
||||
IntrinsicElement = 3,
|
||||
}
|
||||
interface Node extends TextRange {
|
||||
@@ -375,9 +381,11 @@ declare namespace ts {
|
||||
interface NodeArray<T> extends Array<T>, TextRange {
|
||||
hasTrailingComma?: boolean;
|
||||
}
|
||||
interface ModifiersArray extends NodeArray<Node> {
|
||||
interface ModifiersArray extends NodeArray<Modifier> {
|
||||
flags: number;
|
||||
}
|
||||
interface Modifier extends Node {
|
||||
}
|
||||
interface Identifier extends PrimaryExpression {
|
||||
text: string;
|
||||
originalKeywordKind?: SyntaxKind;
|
||||
@@ -393,6 +401,9 @@ declare namespace ts {
|
||||
_declarationBrand: any;
|
||||
name?: DeclarationName;
|
||||
}
|
||||
interface DeclarationStatement extends Declaration, Statement {
|
||||
name?: Identifier;
|
||||
}
|
||||
interface ComputedPropertyName extends Node {
|
||||
expression: Expression;
|
||||
}
|
||||
@@ -405,10 +416,15 @@ declare namespace ts {
|
||||
expression?: Expression;
|
||||
}
|
||||
interface SignatureDeclaration extends Declaration {
|
||||
name?: PropertyName;
|
||||
typeParameters?: NodeArray<TypeParameterDeclaration>;
|
||||
parameters: NodeArray<ParameterDeclaration>;
|
||||
type?: TypeNode;
|
||||
}
|
||||
interface CallSignatureDeclaration extends SignatureDeclaration, TypeElement {
|
||||
}
|
||||
interface ConstructSignatureDeclaration extends SignatureDeclaration, TypeElement {
|
||||
}
|
||||
interface VariableDeclaration extends Declaration {
|
||||
parent?: VariableDeclarationList;
|
||||
name: Identifier | BindingPattern;
|
||||
@@ -431,18 +447,25 @@ declare namespace ts {
|
||||
name: Identifier | BindingPattern;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface PropertyDeclaration extends Declaration, ClassElement {
|
||||
name: DeclarationName;
|
||||
interface PropertySignature extends TypeElement {
|
||||
name: PropertyName;
|
||||
questionToken?: Node;
|
||||
type?: TypeNode;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface PropertyDeclaration extends ClassElement {
|
||||
questionToken?: Node;
|
||||
name: PropertyName;
|
||||
type?: TypeNode;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface ObjectLiteralElement extends Declaration {
|
||||
_objectLiteralBrandBrand: any;
|
||||
name?: PropertyName;
|
||||
}
|
||||
interface PropertyAssignment extends ObjectLiteralElement {
|
||||
_propertyAssignmentBrand: any;
|
||||
name: DeclarationName;
|
||||
name: PropertyName;
|
||||
questionToken?: Node;
|
||||
initializer: Expression;
|
||||
}
|
||||
@@ -460,9 +483,16 @@ declare namespace ts {
|
||||
type?: TypeNode;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface PropertyLikeDeclaration extends Declaration {
|
||||
name: PropertyName;
|
||||
}
|
||||
interface BindingPattern extends Node {
|
||||
elements: NodeArray<BindingElement>;
|
||||
}
|
||||
interface ObjectBindingPattern extends BindingPattern {
|
||||
}
|
||||
interface ArrayBindingPattern extends BindingPattern {
|
||||
}
|
||||
/**
|
||||
* Several node kinds share function-like features such as a signature,
|
||||
* a name, and a body. These nodes should extend FunctionLikeDeclaration.
|
||||
@@ -477,45 +507,61 @@ declare namespace ts {
|
||||
questionToken?: Node;
|
||||
body?: Block | Expression;
|
||||
}
|
||||
interface FunctionDeclaration extends FunctionLikeDeclaration, Statement {
|
||||
interface FunctionDeclaration extends FunctionLikeDeclaration, DeclarationStatement {
|
||||
name?: Identifier;
|
||||
body?: Block;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
interface MethodSignature extends SignatureDeclaration, TypeElement {
|
||||
name: PropertyName;
|
||||
}
|
||||
interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
|
||||
body?: Block;
|
||||
name: PropertyName;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement {
|
||||
body?: Block;
|
||||
body?: FunctionBody;
|
||||
}
|
||||
interface SemicolonClassElement extends ClassElement {
|
||||
_semicolonClassElementBrand: any;
|
||||
}
|
||||
interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement {
|
||||
_accessorDeclarationBrand: any;
|
||||
body: Block;
|
||||
name: PropertyName;
|
||||
body: FunctionBody;
|
||||
}
|
||||
interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement {
|
||||
interface GetAccessorDeclaration extends AccessorDeclaration {
|
||||
}
|
||||
interface SetAccessorDeclaration extends AccessorDeclaration {
|
||||
}
|
||||
interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement, TypeElement {
|
||||
_indexSignatureDeclarationBrand: any;
|
||||
}
|
||||
interface TypeNode extends Node {
|
||||
_typeNodeBrand: any;
|
||||
}
|
||||
interface ThisTypeNode extends TypeNode {
|
||||
_thisTypeNodeBrand: any;
|
||||
}
|
||||
interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration {
|
||||
_functionOrConstructorTypeNodeBrand: any;
|
||||
}
|
||||
interface FunctionTypeNode extends FunctionOrConstructorTypeNode {
|
||||
}
|
||||
interface ConstructorTypeNode extends FunctionOrConstructorTypeNode {
|
||||
}
|
||||
interface TypeReferenceNode extends TypeNode {
|
||||
typeName: EntityName;
|
||||
typeArguments?: NodeArray<TypeNode>;
|
||||
}
|
||||
interface TypePredicateNode extends TypeNode {
|
||||
parameterName: Identifier;
|
||||
parameterName: Identifier | ThisTypeNode;
|
||||
type: TypeNode;
|
||||
}
|
||||
interface TypeQueryNode extends TypeNode {
|
||||
exprName: EntityName;
|
||||
}
|
||||
interface TypeLiteralNode extends TypeNode, Declaration {
|
||||
members: NodeArray<Node>;
|
||||
members: NodeArray<TypeElement>;
|
||||
}
|
||||
interface ArrayTypeNode extends TypeNode {
|
||||
elementType: TypeNode;
|
||||
@@ -533,13 +579,18 @@ declare namespace ts {
|
||||
interface ParenthesizedTypeNode extends TypeNode {
|
||||
type: TypeNode;
|
||||
}
|
||||
interface StringLiteral extends LiteralExpression, TypeNode {
|
||||
interface StringLiteralTypeNode extends LiteralLikeNode, TypeNode {
|
||||
_stringLiteralTypeBrand: any;
|
||||
}
|
||||
interface StringLiteral extends LiteralExpression {
|
||||
_stringLiteralBrand: any;
|
||||
}
|
||||
interface Expression extends Node {
|
||||
_expressionBrand: any;
|
||||
contextualType?: Type;
|
||||
}
|
||||
interface OmittedExpression extends Expression {
|
||||
}
|
||||
interface UnaryExpression extends Expression {
|
||||
_unaryExpressionBrand: any;
|
||||
}
|
||||
@@ -594,25 +645,34 @@ declare namespace ts {
|
||||
colonToken: Node;
|
||||
whenFalse: Expression;
|
||||
}
|
||||
type FunctionBody = Block;
|
||||
type ConciseBody = FunctionBody | Expression;
|
||||
interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration {
|
||||
name?: Identifier;
|
||||
body: Block | Expression;
|
||||
body: FunctionBody;
|
||||
}
|
||||
interface ArrowFunction extends Expression, FunctionLikeDeclaration {
|
||||
equalsGreaterThanToken: Node;
|
||||
body: ConciseBody;
|
||||
}
|
||||
interface LiteralExpression extends PrimaryExpression {
|
||||
interface LiteralLikeNode extends Node {
|
||||
text: string;
|
||||
isUnterminated?: boolean;
|
||||
hasExtendedUnicodeEscape?: boolean;
|
||||
}
|
||||
interface LiteralExpression extends LiteralLikeNode, PrimaryExpression {
|
||||
_literalExpressionBrand: any;
|
||||
}
|
||||
interface TemplateLiteralFragment extends LiteralLikeNode {
|
||||
_templateLiteralFragmentBrand: any;
|
||||
}
|
||||
interface TemplateExpression extends PrimaryExpression {
|
||||
head: LiteralExpression;
|
||||
head: TemplateLiteralFragment;
|
||||
templateSpans: NodeArray<TemplateSpan>;
|
||||
}
|
||||
interface TemplateSpan extends Node {
|
||||
expression: Expression;
|
||||
literal: LiteralExpression;
|
||||
literal: TemplateLiteralFragment;
|
||||
}
|
||||
interface ParenthesizedExpression extends PrimaryExpression {
|
||||
expression: Expression;
|
||||
@@ -694,6 +754,14 @@ declare namespace ts {
|
||||
interface Statement extends Node {
|
||||
_statementBrand: any;
|
||||
}
|
||||
interface EmptyStatement extends Statement {
|
||||
}
|
||||
interface DebuggerStatement extends Statement {
|
||||
}
|
||||
interface MissingDeclaration extends DeclarationStatement, ClassElement, ObjectLiteralElement, TypeElement {
|
||||
name?: Identifier;
|
||||
}
|
||||
type BlockLike = SourceFile | Block | ModuleBlock | CaseClause;
|
||||
interface Block extends Statement {
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
@@ -730,9 +798,13 @@ declare namespace ts {
|
||||
initializer: VariableDeclarationList | Expression;
|
||||
expression: Expression;
|
||||
}
|
||||
interface BreakOrContinueStatement extends Statement {
|
||||
interface BreakStatement extends Statement {
|
||||
label?: Identifier;
|
||||
}
|
||||
interface ContinueStatement extends Statement {
|
||||
label?: Identifier;
|
||||
}
|
||||
type BreakOrContinueStatement = BreakStatement | ContinueStatement;
|
||||
interface ReturnStatement extends Statement {
|
||||
expression?: Expression;
|
||||
}
|
||||
@@ -748,7 +820,7 @@ declare namespace ts {
|
||||
clauses: NodeArray<CaseOrDefaultClause>;
|
||||
}
|
||||
interface CaseClause extends Node {
|
||||
expression?: Expression;
|
||||
expression: Expression;
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
interface DefaultClause extends Node {
|
||||
@@ -777,24 +849,31 @@ declare namespace ts {
|
||||
heritageClauses?: NodeArray<HeritageClause>;
|
||||
members: NodeArray<ClassElement>;
|
||||
}
|
||||
interface ClassDeclaration extends ClassLikeDeclaration, Statement {
|
||||
interface ClassDeclaration extends ClassLikeDeclaration, DeclarationStatement {
|
||||
name?: Identifier;
|
||||
}
|
||||
interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression {
|
||||
}
|
||||
interface ClassElement extends Declaration {
|
||||
_classElementBrand: any;
|
||||
name?: PropertyName;
|
||||
}
|
||||
interface InterfaceDeclaration extends Declaration, Statement {
|
||||
interface TypeElement extends Declaration {
|
||||
_typeElementBrand: any;
|
||||
name?: PropertyName;
|
||||
questionToken?: Node;
|
||||
}
|
||||
interface InterfaceDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
typeParameters?: NodeArray<TypeParameterDeclaration>;
|
||||
heritageClauses?: NodeArray<HeritageClause>;
|
||||
members: NodeArray<Declaration>;
|
||||
members: NodeArray<TypeElement>;
|
||||
}
|
||||
interface HeritageClause extends Node {
|
||||
token: SyntaxKind;
|
||||
types?: NodeArray<ExpressionWithTypeArguments>;
|
||||
}
|
||||
interface TypeAliasDeclaration extends Declaration, Statement {
|
||||
interface TypeAliasDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
typeParameters?: NodeArray<TypeParameterDeclaration>;
|
||||
type: TypeNode;
|
||||
@@ -803,18 +882,19 @@ declare namespace ts {
|
||||
name: DeclarationName;
|
||||
initializer?: Expression;
|
||||
}
|
||||
interface EnumDeclaration extends Declaration, Statement {
|
||||
interface EnumDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
members: NodeArray<EnumMember>;
|
||||
}
|
||||
interface ModuleDeclaration extends Declaration, Statement {
|
||||
type ModuleBody = ModuleBlock | ModuleDeclaration;
|
||||
interface ModuleDeclaration extends DeclarationStatement {
|
||||
name: Identifier | LiteralExpression;
|
||||
body: ModuleBlock | ModuleDeclaration;
|
||||
}
|
||||
interface ModuleBlock extends Node, Statement {
|
||||
statements: NodeArray<Statement>;
|
||||
}
|
||||
interface ImportEqualsDeclaration extends Declaration, Statement {
|
||||
interface ImportEqualsDeclaration extends DeclarationStatement {
|
||||
name: Identifier;
|
||||
moduleReference: EntityName | ExternalModuleReference;
|
||||
}
|
||||
@@ -832,22 +912,27 @@ declare namespace ts {
|
||||
interface NamespaceImport extends Declaration {
|
||||
name: Identifier;
|
||||
}
|
||||
interface ExportDeclaration extends Declaration, Statement {
|
||||
interface ExportDeclaration extends DeclarationStatement {
|
||||
exportClause?: NamedExports;
|
||||
moduleSpecifier?: Expression;
|
||||
}
|
||||
interface NamedImportsOrExports extends Node {
|
||||
elements: NodeArray<ImportOrExportSpecifier>;
|
||||
interface NamedImports extends Node {
|
||||
elements: NodeArray<ImportSpecifier>;
|
||||
}
|
||||
type NamedImports = NamedImportsOrExports;
|
||||
type NamedExports = NamedImportsOrExports;
|
||||
interface ImportOrExportSpecifier extends Declaration {
|
||||
interface NamedExports extends Node {
|
||||
elements: NodeArray<ExportSpecifier>;
|
||||
}
|
||||
type NamedImportsOrExports = NamedImports | NamedExports;
|
||||
interface ImportSpecifier extends Declaration {
|
||||
propertyName?: Identifier;
|
||||
name: Identifier;
|
||||
}
|
||||
type ImportSpecifier = ImportOrExportSpecifier;
|
||||
type ExportSpecifier = ImportOrExportSpecifier;
|
||||
interface ExportAssignment extends Declaration, Statement {
|
||||
interface ExportSpecifier extends Declaration {
|
||||
propertyName?: Identifier;
|
||||
name: Identifier;
|
||||
}
|
||||
type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;
|
||||
interface ExportAssignment extends DeclarationStatement {
|
||||
isExportEquals?: boolean;
|
||||
expression: Expression;
|
||||
}
|
||||
@@ -908,7 +993,7 @@ declare namespace ts {
|
||||
interface JSDocThisType extends JSDocType {
|
||||
type: JSDocType;
|
||||
}
|
||||
interface JSDocRecordMember extends PropertyDeclaration {
|
||||
interface JSDocRecordMember extends PropertySignature {
|
||||
name: Identifier | LiteralExpression;
|
||||
type?: JSDocType;
|
||||
}
|
||||
@@ -934,16 +1019,17 @@ declare namespace ts {
|
||||
postParameterName?: Identifier;
|
||||
isBracketed: boolean;
|
||||
}
|
||||
interface AmdDependency {
|
||||
path: string;
|
||||
name: string;
|
||||
}
|
||||
interface SourceFile extends Declaration {
|
||||
statements: NodeArray<Statement>;
|
||||
endOfFileToken: Node;
|
||||
fileName: string;
|
||||
path: Path;
|
||||
text: string;
|
||||
amdDependencies: {
|
||||
path: string;
|
||||
name: string;
|
||||
}[];
|
||||
amdDependencies: AmdDependency[];
|
||||
moduleName: string;
|
||||
referencedFiles: FileReference[];
|
||||
languageVariant: LanguageVariant;
|
||||
@@ -1053,6 +1139,7 @@ declare namespace ts {
|
||||
getReturnTypeOfSignature(signature: Signature): Type;
|
||||
getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
|
||||
getSymbolAtLocation(node: Node): Symbol;
|
||||
getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
|
||||
getShorthandAssignmentValueSymbol(location: Node): Symbol;
|
||||
getTypeAtLocation(node: Node): Type;
|
||||
typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
|
||||
@@ -1078,7 +1165,7 @@ declare namespace ts {
|
||||
interface SymbolDisplayBuilder {
|
||||
buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void;
|
||||
buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): void;
|
||||
buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void;
|
||||
buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void;
|
||||
@@ -1117,10 +1204,20 @@ declare namespace ts {
|
||||
WriteTypeParametersOrArguments = 1,
|
||||
UseOnlyExternalAliasing = 2,
|
||||
}
|
||||
enum TypePredicateKind {
|
||||
This = 0,
|
||||
Identifier = 1,
|
||||
}
|
||||
interface TypePredicate {
|
||||
kind: TypePredicateKind;
|
||||
type: Type;
|
||||
}
|
||||
interface ThisTypePredicate extends TypePredicate {
|
||||
_thisTypePredicateBrand: any;
|
||||
}
|
||||
interface IdentifierTypePredicate extends TypePredicate {
|
||||
parameterName: string;
|
||||
parameterIndex: number;
|
||||
type: Type;
|
||||
}
|
||||
enum SymbolFlags {
|
||||
None = 0,
|
||||
@@ -1222,6 +1319,7 @@ declare namespace ts {
|
||||
ESSymbol = 16777216,
|
||||
ThisType = 33554432,
|
||||
ObjectLiteralPatternWithComputedProperties = 67108864,
|
||||
PredicateType = 134217728,
|
||||
StringLike = 258,
|
||||
NumberLike = 132,
|
||||
ObjectType = 80896,
|
||||
@@ -1234,6 +1332,9 @@ declare namespace ts {
|
||||
symbol?: Symbol;
|
||||
pattern?: DestructuringPattern;
|
||||
}
|
||||
interface PredicateType extends Type {
|
||||
predicate: ThisTypePredicate | IdentifierTypePredicate;
|
||||
}
|
||||
interface StringLiteralType extends Type {
|
||||
text: string;
|
||||
}
|
||||
@@ -1279,7 +1380,6 @@ declare namespace ts {
|
||||
declaration: SignatureDeclaration;
|
||||
typeParameters: TypeParameter[];
|
||||
parameters: Symbol[];
|
||||
typePredicate?: TypePredicate;
|
||||
}
|
||||
enum IndexKind {
|
||||
String = 0,
|
||||
@@ -1331,6 +1431,7 @@ declare namespace ts {
|
||||
inlineSourceMap?: boolean;
|
||||
inlineSources?: boolean;
|
||||
jsx?: JsxEmit;
|
||||
reactNamespace?: string;
|
||||
listFiles?: boolean;
|
||||
locale?: string;
|
||||
mapRoot?: string;
|
||||
@@ -1366,6 +1467,8 @@ declare namespace ts {
|
||||
noImplicitReturns?: boolean;
|
||||
noFallthroughCasesInSwitch?: boolean;
|
||||
forceConsistentCasingInFileNames?: boolean;
|
||||
allowSyntheticDefaultImports?: boolean;
|
||||
allowJs?: boolean;
|
||||
[option: string]: string | number | boolean;
|
||||
}
|
||||
enum ModuleKind {
|
||||
@@ -1409,6 +1512,7 @@ declare namespace ts {
|
||||
interface ModuleResolutionHost {
|
||||
fileExists(fileName: string): boolean;
|
||||
readFile(fileName: string): string;
|
||||
directoryExists?(directoryName: string): boolean;
|
||||
}
|
||||
interface ResolvedModule {
|
||||
resolvedFileName: string;
|
||||
@@ -1537,6 +1641,7 @@ declare namespace ts {
|
||||
*/
|
||||
function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange;
|
||||
function getTypeParameterOwner(d: Declaration): Declaration;
|
||||
function isParameterPropertyDeclaration(node: ParameterDeclaration): boolean;
|
||||
}
|
||||
declare namespace ts {
|
||||
function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
|
||||
@@ -1546,10 +1651,10 @@ declare namespace ts {
|
||||
}
|
||||
declare namespace ts {
|
||||
const version: string;
|
||||
function findConfigFile(searchPath: string): string;
|
||||
function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean): string;
|
||||
function resolveTripleslashReference(moduleName: string, containingFile: string): string;
|
||||
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function nodeModuleNameResolver(moduleName: string, containingFile: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations;
|
||||
function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
|
||||
function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): Diagnostic[];
|
||||
@@ -1582,7 +1687,7 @@ declare namespace ts {
|
||||
* @param basePath A root directory to resolve relative path entries in the config
|
||||
* file to. e.g. outDir
|
||||
*/
|
||||
function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine;
|
||||
function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions): ParsedCommandLine;
|
||||
function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string): {
|
||||
options: CompilerOptions;
|
||||
errors: Diagnostic[];
|
||||
@@ -1590,7 +1695,7 @@ declare namespace ts {
|
||||
}
|
||||
declare namespace ts {
|
||||
/** The version of the language service API */
|
||||
let servicesVersion: string;
|
||||
const servicesVersion: string;
|
||||
interface Node {
|
||||
getSourceFile(): SourceFile;
|
||||
getChildCount(sourceFile?: SourceFile): number;
|
||||
@@ -1659,7 +1764,7 @@ declare namespace ts {
|
||||
/** Releases all resources held by this script snapshot */
|
||||
dispose?(): void;
|
||||
}
|
||||
module ScriptSnapshot {
|
||||
namespace ScriptSnapshot {
|
||||
function fromString(text: string): IScriptSnapshot;
|
||||
}
|
||||
interface PreProcessedFileInfo {
|
||||
@@ -1687,6 +1792,7 @@ declare namespace ts {
|
||||
error?(s: string): void;
|
||||
useCaseSensitiveFileNames?(): boolean;
|
||||
resolveModuleNames?(moduleNames: string[], containingFile: string): ResolvedModule[];
|
||||
directoryExists?(directoryName: string): boolean;
|
||||
}
|
||||
interface LanguageService {
|
||||
cleanupSemanticCache(): void;
|
||||
@@ -1782,7 +1888,7 @@ declare namespace ts {
|
||||
fileName: string;
|
||||
highlightSpans: HighlightSpan[];
|
||||
}
|
||||
module HighlightSpanKind {
|
||||
namespace HighlightSpanKind {
|
||||
const none: string;
|
||||
const definition: string;
|
||||
const reference: string;
|
||||
@@ -1824,6 +1930,7 @@ declare namespace ts {
|
||||
InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
|
||||
InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
|
||||
PlaceOpenBraceOnNewLineForFunctions: boolean;
|
||||
PlaceOpenBraceOnNewLineForControlBlocks: boolean;
|
||||
[s: string]: boolean | number | string;
|
||||
@@ -2068,7 +2175,7 @@ declare namespace ts {
|
||||
releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
|
||||
reportStats(): string;
|
||||
}
|
||||
module ScriptElementKind {
|
||||
namespace ScriptElementKind {
|
||||
const unknown: string;
|
||||
const warning: string;
|
||||
const keyword: string;
|
||||
@@ -2099,7 +2206,7 @@ declare namespace ts {
|
||||
const constElement: string;
|
||||
const letElement: string;
|
||||
}
|
||||
module ScriptElementKindModifier {
|
||||
namespace ScriptElementKindModifier {
|
||||
const none: string;
|
||||
const publicMemberModifier: string;
|
||||
const privateMemberModifier: string;
|
||||
|
||||
+5708
-4963
File diff suppressed because it is too large
Load Diff
+62
-6
@@ -65,6 +65,7 @@ namespace ts {
|
||||
getTypeCount: () => typeCount,
|
||||
isUndefinedSymbol: symbol => symbol === undefinedSymbol,
|
||||
isArgumentsSymbol: symbol => symbol === argumentsSymbol,
|
||||
isUnknownSymbol: symbol => symbol === unknownSymbol,
|
||||
getDiagnostics,
|
||||
getGlobalDiagnostics,
|
||||
|
||||
@@ -2568,9 +2569,9 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
// A variable declared in a for..in statement is always of type any
|
||||
// A variable declared in a for..in statement is always of type string
|
||||
if (declaration.parent.parent.kind === SyntaxKind.ForInStatement) {
|
||||
return anyType;
|
||||
return stringType;
|
||||
}
|
||||
|
||||
if (declaration.parent.parent.kind === SyntaxKind.ForOfStatement) {
|
||||
@@ -8389,6 +8390,7 @@ namespace ts {
|
||||
if (compilerOptions.noImplicitAny) {
|
||||
error(node, Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, JsxNames.IntrinsicElements);
|
||||
}
|
||||
return unknownSymbol;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8841,6 +8843,56 @@ namespace ts {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the symbol of the for-in variable declared or referenced by the given for-in statement.
|
||||
*/
|
||||
function getForInVariableSymbol(node: ForInStatement): Symbol {
|
||||
const initializer = node.initializer;
|
||||
if (initializer.kind === SyntaxKind.VariableDeclarationList) {
|
||||
const variable = (<VariableDeclarationList>initializer).declarations[0];
|
||||
if (variable && !isBindingPattern(variable.name)) {
|
||||
return getSymbolOfNode(variable);
|
||||
}
|
||||
}
|
||||
else if (initializer.kind === SyntaxKind.Identifier) {
|
||||
return getResolvedSymbol(<Identifier>initializer);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the given type is considered to have numeric property names.
|
||||
*/
|
||||
function hasNumericPropertyNames(type: Type) {
|
||||
return getIndexTypeOfType(type, IndexKind.Number) && !getIndexTypeOfType(type, IndexKind.String);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if given node is an expression consisting of an identifier (possibly parenthesized)
|
||||
* that references a for-in variable for an object with numeric property names.
|
||||
*/
|
||||
function isForInVariableForNumericPropertyNames(expr: Expression) {
|
||||
const e = skipParenthesizedNodes(expr);
|
||||
if (e.kind === SyntaxKind.Identifier) {
|
||||
const symbol = getResolvedSymbol(<Identifier>e);
|
||||
if (symbol.flags & SymbolFlags.Variable) {
|
||||
let child: Node = expr;
|
||||
let node = expr.parent;
|
||||
while (node) {
|
||||
if (node.kind === SyntaxKind.ForInStatement &&
|
||||
child === (<ForInStatement>node).statement &&
|
||||
getForInVariableSymbol(<ForInStatement>node) === symbol &&
|
||||
hasNumericPropertyNames(checkExpression((<ForInStatement>node).expression))) {
|
||||
return true;
|
||||
}
|
||||
child = node;
|
||||
node = node.parent;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function checkIndexedAccess(node: ElementAccessExpression): Type {
|
||||
// Grammar checking
|
||||
if (!node.argumentExpression) {
|
||||
@@ -8901,7 +8953,7 @@ namespace ts {
|
||||
if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, TypeFlags.StringLike | TypeFlags.NumberLike | TypeFlags.ESSymbol)) {
|
||||
|
||||
// Try to use a number indexer.
|
||||
if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, TypeFlags.NumberLike)) {
|
||||
if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, TypeFlags.NumberLike) || isForInVariableForNumericPropertyNames(node.argumentExpression)) {
|
||||
const numberIndexType = getIndexTypeOfType(objectType, IndexKind.Number);
|
||||
if (numberIndexType) {
|
||||
return numberIndexType;
|
||||
@@ -8916,7 +8968,9 @@ namespace ts {
|
||||
|
||||
// Fall back to any.
|
||||
if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !isTypeAny(objectType)) {
|
||||
error(node, Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type);
|
||||
error(node, getIndexTypeOfType(objectType, IndexKind.Number) ?
|
||||
Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number :
|
||||
Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type);
|
||||
}
|
||||
|
||||
return anyType;
|
||||
@@ -12983,7 +13037,8 @@ namespace ts {
|
||||
}
|
||||
// For a binding pattern, validate the initializer and exit
|
||||
if (isBindingPattern(node.name)) {
|
||||
if (node.initializer) {
|
||||
// Don't validate for-in initializer as it is already an error
|
||||
if (node.initializer && node.parent.parent.kind !== SyntaxKind.ForInStatement) {
|
||||
checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, /*headMessage*/ undefined);
|
||||
checkParameterInitializer(node);
|
||||
}
|
||||
@@ -12993,7 +13048,8 @@ namespace ts {
|
||||
const type = getTypeOfVariableOrParameterOrProperty(symbol);
|
||||
if (node === symbol.valueDeclaration) {
|
||||
// Node is the primary declaration of the symbol, just validate the initializer
|
||||
if (node.initializer) {
|
||||
// Don't validate for-in initializer as it is already an error
|
||||
if (node.initializer && node.parent.parent.kind !== SyntaxKind.ForInStatement) {
|
||||
checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, /*headMessage*/ undefined);
|
||||
checkParameterInitializer(node);
|
||||
}
|
||||
|
||||
@@ -2430,6 +2430,10 @@
|
||||
"category": "Error",
|
||||
"code": 7013
|
||||
},
|
||||
"Element implicitly has an 'any' type because index expression is not of type 'number'.": {
|
||||
"category": "Error",
|
||||
"code": 7015
|
||||
},
|
||||
"Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation.": {
|
||||
"category": "Error",
|
||||
"code": 7016
|
||||
|
||||
@@ -1738,6 +1738,7 @@ namespace ts {
|
||||
isImplementationOfOverload(node: FunctionLikeDeclaration): boolean;
|
||||
isUndefinedSymbol(symbol: Symbol): boolean;
|
||||
isArgumentsSymbol(symbol: Symbol): boolean;
|
||||
isUnknownSymbol(symbol: Symbol): boolean;
|
||||
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
|
||||
|
||||
@@ -3310,6 +3310,30 @@ namespace FourSlashInterface {
|
||||
return getClassification("typeAliasName", text, position);
|
||||
}
|
||||
|
||||
export function jsxOpenTagName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } {
|
||||
return getClassification("jsxOpenTagName", text, position);
|
||||
}
|
||||
|
||||
export function jsxCloseTagName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } {
|
||||
return getClassification("jsxCloseTagName", text, position);
|
||||
}
|
||||
|
||||
export function jsxSelfClosingTagName(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } {
|
||||
return getClassification("jsxSelfClosingTagName", text, position);
|
||||
}
|
||||
|
||||
export function jsxAttribute(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } {
|
||||
return getClassification("jsxAttribute", text, position);
|
||||
}
|
||||
|
||||
export function jsxText(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } {
|
||||
return getClassification("jsxText", text, position);
|
||||
}
|
||||
|
||||
export function jsxAttributeStringLiteralValue(text: string, position?: number): { classificationType: string; text: string; textSpan?: FourSlash.TextSpan } {
|
||||
return getClassification("jsxAttributeStringLiteralValue", text, position);
|
||||
}
|
||||
|
||||
function getClassification(type: string, text: string, position?: number) {
|
||||
return {
|
||||
classificationType: type,
|
||||
|
||||
Vendored
+8
-8
@@ -1281,15 +1281,15 @@ interface PromiseConstructor {
|
||||
* @param values An array of Promises.
|
||||
* @returns A new Promise.
|
||||
*/
|
||||
all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
|
||||
all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
|
||||
all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
|
||||
all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
|
||||
all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
|
||||
all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
|
||||
all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
|
||||
all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
|
||||
all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
|
||||
all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
|
||||
all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
|
||||
all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
|
||||
|
||||
/**
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace ts.formatting {
|
||||
|
||||
function findOutermostParent(position: number, expectedTokenKind: SyntaxKind, sourceFile: SourceFile): Node {
|
||||
let precedingToken = findPrecedingToken(position, sourceFile);
|
||||
|
||||
|
||||
// when it is claimed that trigger character was typed at given position
|
||||
// we verify that there is a token with a matching kind whose end is equal to position (because the character was just typed).
|
||||
// If this condition is not hold - then trigger character was typed in some other context,
|
||||
@@ -151,7 +151,7 @@ namespace ts.formatting {
|
||||
|
||||
return current;
|
||||
}
|
||||
|
||||
|
||||
// Returns true if node is a element in some list in parent
|
||||
// i.e. parent is class declaration with the list of members and node is one of members.
|
||||
function isListElement(parent: Node, node: Node): boolean {
|
||||
@@ -198,7 +198,7 @@ namespace ts.formatting {
|
||||
if (!errors.length) {
|
||||
return rangeHasNoErrors;
|
||||
}
|
||||
|
||||
|
||||
// pick only errors that fall in range
|
||||
let sorted = errors
|
||||
.filter(d => rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length))
|
||||
@@ -341,6 +341,14 @@ namespace ts.formatting {
|
||||
processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta);
|
||||
}
|
||||
|
||||
if (!formattingScanner.isOnToken()) {
|
||||
let leadingTrivia = formattingScanner.getCurrentLeadingTrivia();
|
||||
if (leadingTrivia) {
|
||||
processTrivia(leadingTrivia, enclosingNode, enclosingNode, undefined);
|
||||
trimTrailingWhitespacesForRemainingRange();
|
||||
}
|
||||
}
|
||||
|
||||
formattingScanner.close();
|
||||
|
||||
return edits;
|
||||
@@ -828,9 +836,7 @@ namespace ts.formatting {
|
||||
}
|
||||
|
||||
// We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line
|
||||
trimTrailingWhitespaces =
|
||||
(rule.Operation.Action & (RuleAction.NewLine | RuleAction.Space)) &&
|
||||
rule.Flag !== RuleFlags.CanDeleteNewLines;
|
||||
trimTrailingWhitespaces = !(rule.Operation.Action & RuleAction.Delete) && rule.Flag !== RuleFlags.CanDeleteNewLines;
|
||||
}
|
||||
else {
|
||||
trimTrailingWhitespaces = true;
|
||||
@@ -929,17 +935,41 @@ namespace ts.formatting {
|
||||
continue;
|
||||
}
|
||||
|
||||
let pos = lineEndPosition;
|
||||
while (pos >= lineStartPosition && isWhiteSpace(sourceFile.text.charCodeAt(pos))) {
|
||||
pos--;
|
||||
}
|
||||
if (pos !== lineEndPosition) {
|
||||
Debug.assert(pos === lineStartPosition || !isWhiteSpace(sourceFile.text.charCodeAt(pos)));
|
||||
recordDelete(pos + 1, lineEndPosition - pos);
|
||||
let whitespaceStart = getTrailingWhitespaceStartPosition(lineStartPosition, lineEndPosition);
|
||||
if (whitespaceStart !== -1) {
|
||||
Debug.assert(whitespaceStart === lineStartPosition || !isWhiteSpace(sourceFile.text.charCodeAt(whitespaceStart - 1)));
|
||||
recordDelete(whitespaceStart, lineEndPosition + 1 - whitespaceStart);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param start The position of the first character in range
|
||||
* @param end The position of the last character in range
|
||||
*/
|
||||
function getTrailingWhitespaceStartPosition(start: number, end: number) {
|
||||
let pos = end;
|
||||
while (pos >= start && isWhiteSpace(sourceFile.text.charCodeAt(pos))) {
|
||||
pos--;
|
||||
}
|
||||
if (pos !== end) {
|
||||
return pos + 1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Trimming will be done for lines after the previous range
|
||||
*/
|
||||
function trimTrailingWhitespacesForRemainingRange() {
|
||||
let startPosition = previousRange ? previousRange.end : originalRange.pos;
|
||||
|
||||
let startLine = sourceFile.getLineAndCharacterOfPosition(startPosition).line;
|
||||
let endLine = sourceFile.getLineAndCharacterOfPosition(originalRange.end).line;
|
||||
|
||||
trimTrailingWhitespacesForLines(startLine, endLine + 1, previousRange);
|
||||
}
|
||||
|
||||
function newTextChange(start: number, len: number, newText: string): TextChange {
|
||||
return { span: createTextSpan(start, len), newText }
|
||||
}
|
||||
|
||||
@@ -5,21 +5,22 @@
|
||||
namespace ts.formatting {
|
||||
const standardScanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ false, LanguageVariant.Standard);
|
||||
const jsxScanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ false, LanguageVariant.JSX);
|
||||
|
||||
|
||||
/**
|
||||
* Scanner that is currently used for formatting
|
||||
*/
|
||||
let scanner: Scanner;
|
||||
|
||||
|
||||
export interface FormattingScanner {
|
||||
advance(): void;
|
||||
isOnToken(): boolean;
|
||||
readTokenInfo(n: Node): TokenInfo;
|
||||
getCurrentLeadingTrivia(): TextRangeWithKind[];
|
||||
lastTrailingTriviaWasNewLine(): boolean;
|
||||
close(): void;
|
||||
}
|
||||
|
||||
const enum ScanAction{
|
||||
const enum ScanAction {
|
||||
Scan,
|
||||
RescanGreaterThanToken,
|
||||
RescanSlashToken,
|
||||
@@ -37,19 +38,20 @@ namespace ts.formatting {
|
||||
let wasNewLine: boolean = true;
|
||||
let leadingTrivia: TextRangeWithKind[];
|
||||
let trailingTrivia: TextRangeWithKind[];
|
||||
|
||||
|
||||
let savedPos: number;
|
||||
let lastScanAction: ScanAction;
|
||||
let lastTokenInfo: TokenInfo;
|
||||
|
||||
return {
|
||||
advance: advance,
|
||||
readTokenInfo: readTokenInfo,
|
||||
isOnToken: isOnToken,
|
||||
advance,
|
||||
readTokenInfo,
|
||||
isOnToken,
|
||||
getCurrentLeadingTrivia: () => leadingTrivia,
|
||||
lastTrailingTriviaWasNewLine: () => wasNewLine,
|
||||
close: () => {
|
||||
Debug.assert(scanner !== undefined);
|
||||
|
||||
|
||||
lastTokenInfo = undefined;
|
||||
scanner.setText(undefined);
|
||||
scanner = undefined;
|
||||
@@ -58,7 +60,7 @@ namespace ts.formatting {
|
||||
|
||||
function advance(): void {
|
||||
Debug.assert(scanner !== undefined);
|
||||
|
||||
|
||||
lastTokenInfo = undefined;
|
||||
let isStarted = scanner.getStartPos() !== startPos;
|
||||
|
||||
@@ -81,7 +83,7 @@ namespace ts.formatting {
|
||||
|
||||
let t: SyntaxKind;
|
||||
let pos = scanner.getStartPos();
|
||||
|
||||
|
||||
// Read leading trivia and token
|
||||
while (pos < endPos) {
|
||||
let t = scanner.getToken();
|
||||
@@ -122,10 +124,10 @@ namespace ts.formatting {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function shouldRescanJsxIdentifier(node: Node): boolean {
|
||||
if (node.parent) {
|
||||
switch(node.parent.kind) {
|
||||
switch (node.parent.kind) {
|
||||
case SyntaxKind.JsxAttribute:
|
||||
case SyntaxKind.JsxOpeningElement:
|
||||
case SyntaxKind.JsxClosingElement:
|
||||
@@ -133,7 +135,7 @@ namespace ts.formatting {
|
||||
return node.kind === SyntaxKind.Identifier;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -142,7 +144,7 @@ namespace ts.formatting {
|
||||
}
|
||||
|
||||
function shouldRescanTemplateToken(container: Node): boolean {
|
||||
return container.kind === SyntaxKind.TemplateMiddle ||
|
||||
return container.kind === SyntaxKind.TemplateMiddle ||
|
||||
container.kind === SyntaxKind.TemplateTail;
|
||||
}
|
||||
|
||||
@@ -152,11 +154,11 @@ namespace ts.formatting {
|
||||
|
||||
function readTokenInfo(n: Node): TokenInfo {
|
||||
Debug.assert(scanner !== undefined);
|
||||
|
||||
|
||||
if (!isOnToken()) {
|
||||
// scanner is not on the token (either advance was not called yet or scanner is already past the end position)
|
||||
return {
|
||||
leadingTrivia: leadingTrivia,
|
||||
leadingTrivia,
|
||||
trailingTrivia: undefined,
|
||||
token: undefined
|
||||
};
|
||||
@@ -164,7 +166,7 @@ namespace ts.formatting {
|
||||
|
||||
// normally scanner returns the smallest available token
|
||||
// check the kind of context node to determine if scanner should have more greedy behavior and consume more text.
|
||||
let expectedScanAction =
|
||||
let expectedScanAction =
|
||||
shouldRescanGreaterThanToken(n)
|
||||
? ScanAction.RescanGreaterThanToken
|
||||
: shouldRescanSlashToken(n)
|
||||
@@ -226,7 +228,7 @@ namespace ts.formatting {
|
||||
if (trailingTrivia) {
|
||||
trailingTrivia = undefined;
|
||||
}
|
||||
while(scanner.getStartPos() < endPos) {
|
||||
while (scanner.getStartPos() < endPos) {
|
||||
currentToken = scanner.scan();
|
||||
if (!isTrivia(currentToken)) {
|
||||
break;
|
||||
@@ -261,7 +263,7 @@ namespace ts.formatting {
|
||||
|
||||
function isOnToken(): boolean {
|
||||
Debug.assert(scanner !== undefined);
|
||||
|
||||
|
||||
let current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken();
|
||||
let startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos();
|
||||
return startPos < endPos && current !== SyntaxKind.EndOfFileToken && !isTrivia(current);
|
||||
|
||||
@@ -444,7 +444,7 @@ namespace ts.formatting {
|
||||
///
|
||||
|
||||
// Insert space after comma delimiter
|
||||
this.SpaceAfterComma = new Rule(RuleDescriptor.create3(SyntaxKind.CommaToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Space));
|
||||
this.SpaceAfterComma = new Rule(RuleDescriptor.create3(SyntaxKind.CommaToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNextTokenNotCloseBracket), RuleAction.Space));
|
||||
this.NoSpaceAfterComma = new Rule(RuleDescriptor.create3(SyntaxKind.CommaToken, Shared.TokenRange.Any), RuleOperation.create2(new RuleOperationContext(Rules.IsSameLineTokenContext), RuleAction.Delete));
|
||||
|
||||
// Insert space before and after binary operators
|
||||
@@ -711,6 +711,10 @@ namespace ts.formatting {
|
||||
return context.currentTokenSpan.kind !== SyntaxKind.CommaToken;
|
||||
}
|
||||
|
||||
static IsNextTokenNotCloseBracket(context: FormattingContext): boolean {
|
||||
return context.nextTokenSpan.kind !== SyntaxKind.CloseBracketToken;
|
||||
}
|
||||
|
||||
static IsArrowFunctionContext(context: FormattingContext): boolean {
|
||||
return context.contextNode.kind === SyntaxKind.ArrowFunction;
|
||||
}
|
||||
|
||||
+46
-10
@@ -1616,6 +1616,9 @@ namespace ts {
|
||||
public static jsxOpenTagName = "jsx open tag name";
|
||||
public static jsxCloseTagName = "jsx close tag name";
|
||||
public static jsxSelfClosingTagName = "jsx self closing tag name";
|
||||
public static jsxAttribute = "jsx attribute";
|
||||
public static jsxText = "jsx text";
|
||||
public static jsxAttributeStringLiteralValue = "jsx attribute string literal value";
|
||||
}
|
||||
|
||||
export const enum ClassificationType {
|
||||
@@ -1640,6 +1643,9 @@ namespace ts {
|
||||
jsxOpenTagName = 19,
|
||||
jsxCloseTagName = 20,
|
||||
jsxSelfClosingTagName = 21,
|
||||
jsxAttribute = 22,
|
||||
jsxText = 23,
|
||||
jsxAttributeStringLiteralValue = 24,
|
||||
}
|
||||
|
||||
/// Language Service
|
||||
@@ -3099,6 +3105,7 @@ namespace ts {
|
||||
}
|
||||
else if (kind === SyntaxKind.SlashToken && contextToken.parent.kind === SyntaxKind.JsxClosingElement) {
|
||||
isStartingCloseTag = true;
|
||||
location = contextToken;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3124,8 +3131,11 @@ namespace ts {
|
||||
}
|
||||
else if (isStartingCloseTag) {
|
||||
const tagName = (<JsxElement>contextToken.parent.parent).openingElement.tagName;
|
||||
symbols = [typeChecker.getSymbolAtLocation(tagName)];
|
||||
const tagSymbol = typeChecker.getSymbolAtLocation(tagName);
|
||||
|
||||
if (!typeChecker.isUnknownSymbol(tagSymbol)) {
|
||||
symbols = [tagSymbol];
|
||||
}
|
||||
isMemberCompletion = true;
|
||||
isNewIdentifierLocation = false;
|
||||
}
|
||||
@@ -3831,7 +3841,23 @@ namespace ts {
|
||||
}
|
||||
else {
|
||||
if (!symbols || symbols.length === 0) {
|
||||
return undefined;
|
||||
if (sourceFile.languageVariant === LanguageVariant.JSX &&
|
||||
location.parent && location.parent.kind === SyntaxKind.JsxClosingElement) {
|
||||
// In the TypeScript JSX element, if such element is not defined. When users query for completion at closing tag,
|
||||
// instead of simply giving unknown value, the completion will return the tag-name of an associated opening-element.
|
||||
// For example:
|
||||
// var x = <div> </ /*1*/> completion list at "1" will contain "div" with type any
|
||||
const tagName = (<JsxElement>location.parent.parent).openingElement.tagName;
|
||||
entries.push({
|
||||
name: (<Identifier>tagName).text,
|
||||
kind: undefined,
|
||||
kindModifiers: undefined,
|
||||
sortText: "0",
|
||||
});
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
getCompletionEntriesFromSymbols(symbols, entries);
|
||||
@@ -4439,7 +4465,7 @@ namespace ts {
|
||||
const typeChecker = program.getTypeChecker();
|
||||
const symbol = typeChecker.getSymbolAtLocation(node);
|
||||
|
||||
if (!symbol) {
|
||||
if (!symbol || typeChecker.isUnknownSymbol(symbol)) {
|
||||
// Try getting just type at this position and show
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.Identifier:
|
||||
@@ -6574,6 +6600,9 @@ namespace ts {
|
||||
case ClassificationType.jsxOpenTagName: return ClassificationTypeNames.jsxOpenTagName;
|
||||
case ClassificationType.jsxCloseTagName: return ClassificationTypeNames.jsxCloseTagName;
|
||||
case ClassificationType.jsxSelfClosingTagName: return ClassificationTypeNames.jsxSelfClosingTagName;
|
||||
case ClassificationType.jsxAttribute: return ClassificationTypeNames.jsxAttribute;
|
||||
case ClassificationType.jsxText: return ClassificationTypeNames.jsxText;
|
||||
case ClassificationType.jsxAttributeStringLiteralValue: return ClassificationTypeNames.jsxAttributeStringLiteralValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6782,12 +6811,12 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
function classifyToken(token: Node): void {
|
||||
function classifyTokenOrJsxText(token: Node): void {
|
||||
if (nodeIsMissing(token)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const tokenStart = classifyLeadingTriviaAndGetTokenStart(token);
|
||||
const tokenStart = token.kind === SyntaxKind.JsxText ? token.pos : classifyLeadingTriviaAndGetTokenStart(token);
|
||||
|
||||
const tokenWidth = token.end - tokenStart;
|
||||
Debug.assert(tokenWidth >= 0);
|
||||
@@ -6823,7 +6852,8 @@ namespace ts {
|
||||
// the '=' in a variable declaration is special cased here.
|
||||
if (token.parent.kind === SyntaxKind.VariableDeclaration ||
|
||||
token.parent.kind === SyntaxKind.PropertyDeclaration ||
|
||||
token.parent.kind === SyntaxKind.Parameter) {
|
||||
token.parent.kind === SyntaxKind.Parameter ||
|
||||
token.parent.kind === SyntaxKind.JsxAttribute) {
|
||||
return ClassificationType.operator;
|
||||
}
|
||||
}
|
||||
@@ -6842,7 +6872,7 @@ namespace ts {
|
||||
return ClassificationType.numericLiteral;
|
||||
}
|
||||
else if (tokenKind === SyntaxKind.StringLiteral || tokenKind === SyntaxKind.StringLiteralType) {
|
||||
return ClassificationType.stringLiteral;
|
||||
return token.parent.kind === SyntaxKind.JsxAttribute ? ClassificationType.jsxAttributeStringLiteralValue : ClassificationType.stringLiteral;
|
||||
}
|
||||
else if (tokenKind === SyntaxKind.RegularExpressionLiteral) {
|
||||
// TODO: we should get another classification type for these literals.
|
||||
@@ -6852,6 +6882,9 @@ namespace ts {
|
||||
// TODO (drosen): we should *also* get another classification type for these literals.
|
||||
return ClassificationType.stringLiteral;
|
||||
}
|
||||
else if (tokenKind === SyntaxKind.JsxText) {
|
||||
return ClassificationType.jsxText;
|
||||
}
|
||||
else if (tokenKind === SyntaxKind.Identifier) {
|
||||
if (token) {
|
||||
switch (token.parent.kind) {
|
||||
@@ -6903,9 +6936,12 @@ namespace ts {
|
||||
return ClassificationType.jsxSelfClosingTagName;
|
||||
}
|
||||
return;
|
||||
case SyntaxKind.JsxAttribute:
|
||||
if ((<JsxAttribute>token.parent).name === token) {
|
||||
return ClassificationType.jsxAttribute;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ClassificationType.identifier;
|
||||
}
|
||||
}
|
||||
@@ -6922,8 +6958,8 @@ namespace ts {
|
||||
const children = element.getChildren(sourceFile);
|
||||
for (let i = 0, n = children.length; i < n; i++) {
|
||||
const child = children[i];
|
||||
if (isToken(child)) {
|
||||
classifyToken(child);
|
||||
if (isToken(child) || child.kind === SyntaxKind.JsxText) {
|
||||
classifyTokenOrJsxText(child);
|
||||
}
|
||||
else {
|
||||
// Recurse into our child nodes.
|
||||
|
||||
+19
-8
@@ -16,7 +16,11 @@
|
||||
/// <reference path='services.ts' />
|
||||
|
||||
/* @internal */
|
||||
var debugObjectHost = (<any>this);
|
||||
let debugObjectHost = (<any>this);
|
||||
|
||||
// We need to use 'null' to interface with the managed side.
|
||||
/* tslint:disable:no-null */
|
||||
/* tslint:disable:no-in-operator */
|
||||
|
||||
/* @internal */
|
||||
namespace ts {
|
||||
@@ -234,8 +238,6 @@ namespace ts {
|
||||
}
|
||||
|
||||
class ScriptSnapshotShimAdapter implements IScriptSnapshot {
|
||||
private lineStartPositions: number[] = null;
|
||||
|
||||
constructor(private scriptSnapshotShim: ScriptSnapshotShim) {
|
||||
}
|
||||
|
||||
@@ -940,7 +942,7 @@ namespace ts {
|
||||
return {
|
||||
options: {},
|
||||
files: [],
|
||||
errors: [realizeDiagnostic(result.error, '\r\n')]
|
||||
errors: [realizeDiagnostic(result.error, "\r\n")]
|
||||
};
|
||||
}
|
||||
|
||||
@@ -949,7 +951,7 @@ namespace ts {
|
||||
return {
|
||||
options: configFile.options,
|
||||
files: configFile.fileNames,
|
||||
errors: realizeDiagnostics(configFile.errors, '\r\n')
|
||||
errors: realizeDiagnostics(configFile.errors, "\r\n")
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -1039,12 +1041,21 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
/* tslint:enable:no-in-operator */
|
||||
/* tslint:enable:no-null */
|
||||
|
||||
|
||||
/// TODO: this is used by VS, clean this up on both sides of the interface
|
||||
/* @internal */
|
||||
module TypeScript.Services {
|
||||
export var TypeScriptServicesFactory = ts.TypeScriptServicesFactory;
|
||||
namespace TypeScript.Services {
|
||||
export const TypeScriptServicesFactory = ts.TypeScriptServicesFactory;
|
||||
}
|
||||
|
||||
/* tslint:disable:no-unused-variable */
|
||||
// 'toolsVersion' gets consumed by the managed side, so it's not unused.
|
||||
// TODO: it should be moved into a namespace though.
|
||||
|
||||
/* @internal */
|
||||
const toolsVersion = "1.6";
|
||||
const toolsVersion = "1.8";
|
||||
|
||||
/* tslint:enable:no-unused-variable */
|
||||
@@ -1,18 +1,18 @@
|
||||
=== tests/cases/compiler/capturedLetConstInLoop1.ts ===
|
||||
//==== let
|
||||
for (let x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
(function() { return x});
|
||||
>(function() { return x}) : () => any
|
||||
>function() { return x} : () => any
|
||||
>x : any
|
||||
>(function() { return x}) : () => string
|
||||
>function() { return x} : () => string
|
||||
>x : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
}
|
||||
|
||||
for (let x of []) {
|
||||
@@ -216,18 +216,18 @@ for (let y = 0; y < 1; ++y) {
|
||||
|
||||
//=========const
|
||||
for (const x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
(function() { return x});
|
||||
>(function() { return x}) : () => any
|
||||
>function() { return x} : () => any
|
||||
>x : any
|
||||
>(function() { return x}) : () => string
|
||||
>function() { return x} : () => string
|
||||
>x : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
}
|
||||
|
||||
for (const x of []) {
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
=== tests/cases/compiler/capturedLetConstInLoop1_ES6.ts ===
|
||||
//==== let
|
||||
for (let x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
(function() { return x});
|
||||
>(function() { return x}) : () => any
|
||||
>function() { return x} : () => any
|
||||
>x : any
|
||||
>(function() { return x}) : () => string
|
||||
>function() { return x} : () => string
|
||||
>x : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
}
|
||||
|
||||
for (let x of []) {
|
||||
@@ -216,18 +216,18 @@ for (let y = 0; y < 1; ++y) {
|
||||
|
||||
//=========const
|
||||
for (const x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
(function() { return x});
|
||||
>(function() { return x}) : () => any
|
||||
>function() { return x} : () => any
|
||||
>x : any
|
||||
>(function() { return x}) : () => string
|
||||
>function() { return x} : () => string
|
||||
>x : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
}
|
||||
|
||||
for (const x of []) {
|
||||
|
||||
@@ -37,7 +37,7 @@ function foo0_1(x) {
|
||||
>x : any
|
||||
|
||||
for (let x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
let a = arguments.length;
|
||||
@@ -47,17 +47,17 @@ function foo0_1(x) {
|
||||
>length : number
|
||||
|
||||
(function() { return x + a });
|
||||
>(function() { return x + a }) : () => any
|
||||
>function() { return x + a } : () => any
|
||||
>x + a : any
|
||||
>x : any
|
||||
>(function() { return x + a }) : () => string
|
||||
>function() { return x + a } : () => string
|
||||
>x + a : string
|
||||
>x : string
|
||||
>a : number
|
||||
|
||||
(() => x + a);
|
||||
>(() => x + a) : () => any
|
||||
>() => x + a : () => any
|
||||
>x + a : any
|
||||
>x : any
|
||||
>(() => x + a) : () => string
|
||||
>() => x + a : () => string
|
||||
>x + a : string
|
||||
>x : string
|
||||
>a : number
|
||||
}
|
||||
}
|
||||
@@ -400,7 +400,7 @@ function foo0_1_c(x) {
|
||||
>x : any
|
||||
|
||||
for (const x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
const a = arguments.length;
|
||||
@@ -410,17 +410,17 @@ function foo0_1_c(x) {
|
||||
>length : number
|
||||
|
||||
(function() { return x + a });
|
||||
>(function() { return x + a }) : () => any
|
||||
>function() { return x + a } : () => any
|
||||
>x + a : any
|
||||
>x : any
|
||||
>(function() { return x + a }) : () => string
|
||||
>function() { return x + a } : () => string
|
||||
>x + a : string
|
||||
>x : string
|
||||
>a : number
|
||||
|
||||
(() => x + a);
|
||||
>(() => x + a) : () => any
|
||||
>() => x + a : () => any
|
||||
>x + a : any
|
||||
>x : any
|
||||
>(() => x + a) : () => string
|
||||
>() => x + a : () => string
|
||||
>x + a : string
|
||||
>x : string
|
||||
>a : number
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ function foo0_1(x) {
|
||||
>x : any
|
||||
|
||||
for (let x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
let a = arguments.length;
|
||||
@@ -46,17 +46,17 @@ function foo0_1(x) {
|
||||
>length : number
|
||||
|
||||
(function() { return x + a });
|
||||
>(function() { return x + a }) : () => any
|
||||
>function() { return x + a } : () => any
|
||||
>x + a : any
|
||||
>x : any
|
||||
>(function() { return x + a }) : () => string
|
||||
>function() { return x + a } : () => string
|
||||
>x + a : string
|
||||
>x : string
|
||||
>a : number
|
||||
|
||||
(() => x + a);
|
||||
>(() => x + a) : () => any
|
||||
>() => x + a : () => any
|
||||
>x + a : any
|
||||
>x : any
|
||||
>(() => x + a) : () => string
|
||||
>() => x + a : () => string
|
||||
>x + a : string
|
||||
>x : string
|
||||
>a : number
|
||||
}
|
||||
}
|
||||
@@ -399,7 +399,7 @@ function foo0_1_c(x) {
|
||||
>x : any
|
||||
|
||||
for (const x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
const a = arguments.length;
|
||||
@@ -409,17 +409,17 @@ function foo0_1_c(x) {
|
||||
>length : number
|
||||
|
||||
(function() { return x + a });
|
||||
>(function() { return x + a }) : () => any
|
||||
>function() { return x + a } : () => any
|
||||
>x + a : any
|
||||
>x : any
|
||||
>(function() { return x + a }) : () => string
|
||||
>function() { return x + a } : () => string
|
||||
>x + a : string
|
||||
>x : string
|
||||
>a : number
|
||||
|
||||
(() => x + a);
|
||||
>(() => x + a) : () => any
|
||||
>() => x + a : () => any
|
||||
>x + a : any
|
||||
>x : any
|
||||
>(() => x + a) : () => string
|
||||
>() => x + a : () => string
|
||||
>x + a : string
|
||||
>x : string
|
||||
>a : number
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,32 +42,32 @@ function foo0_1(x) {
|
||||
>x : any
|
||||
|
||||
for (let x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
var v = x;
|
||||
>v : any
|
||||
>x : any
|
||||
>v : string
|
||||
>x : string
|
||||
|
||||
(function() { return x + v });
|
||||
>(function() { return x + v }) : () => any
|
||||
>function() { return x + v } : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(function() { return x + v }) : () => string
|
||||
>function() { return x + v } : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
|
||||
(() => x + v);
|
||||
>(() => x + v) : () => any
|
||||
>() => x + v : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(() => x + v) : () => string
|
||||
>() => x + v : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
}
|
||||
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : any
|
||||
>v : string
|
||||
}
|
||||
|
||||
function foo1(x) {
|
||||
@@ -438,32 +438,32 @@ function foo0_1_c(x) {
|
||||
>x : any
|
||||
|
||||
for (const x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
var v = x;
|
||||
>v : any
|
||||
>x : any
|
||||
>v : string
|
||||
>x : string
|
||||
|
||||
(function() { return x + v });
|
||||
>(function() { return x + v }) : () => any
|
||||
>function() { return x + v } : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(function() { return x + v }) : () => string
|
||||
>function() { return x + v } : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
|
||||
(() => x + v);
|
||||
>(() => x + v) : () => any
|
||||
>() => x + v : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(() => x + v) : () => string
|
||||
>() => x + v : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
}
|
||||
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : any
|
||||
>v : string
|
||||
}
|
||||
|
||||
function foo1_c(x) {
|
||||
|
||||
@@ -43,32 +43,32 @@ function foo0_1(x) {
|
||||
>x : any
|
||||
|
||||
for (let x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
var v = x;
|
||||
>v : any
|
||||
>x : any
|
||||
>v : string
|
||||
>x : string
|
||||
|
||||
(function() { return x + v });
|
||||
>(function() { return x + v }) : () => any
|
||||
>function() { return x + v } : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(function() { return x + v }) : () => string
|
||||
>function() { return x + v } : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
|
||||
(() => x + v);
|
||||
>(() => x + v) : () => any
|
||||
>() => x + v : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(() => x + v) : () => string
|
||||
>() => x + v : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
}
|
||||
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : any
|
||||
>v : string
|
||||
}
|
||||
|
||||
function foo1(x) {
|
||||
@@ -439,32 +439,32 @@ function foo0_1_c(x) {
|
||||
>x : any
|
||||
|
||||
for (const x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
var v = x;
|
||||
>v : any
|
||||
>x : any
|
||||
>v : string
|
||||
>x : string
|
||||
|
||||
(function() { return x + v });
|
||||
>(function() { return x + v }) : () => any
|
||||
>function() { return x + v } : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(function() { return x + v }) : () => string
|
||||
>function() { return x + v } : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
|
||||
(() => x + v);
|
||||
>(() => x + v) : () => any
|
||||
>() => x + v : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(() => x + v) : () => string
|
||||
>() => x + v : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
}
|
||||
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : any
|
||||
>v : string
|
||||
}
|
||||
|
||||
function foo1_c(x) {
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
|
||||
//======let
|
||||
export function exportedFoo() {
|
||||
>exportedFoo : () => any
|
||||
>exportedFoo : () => string
|
||||
|
||||
return v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8;
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 : any
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 + v7 : any
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 : any
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 : any
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 : any
|
||||
>v0 + v00 + v1 + v2 + v3 : any
|
||||
>v0 + v00 + v1 + v2 : any
|
||||
>v0 + v00 + v1 : any
|
||||
>v0 + v00 : any
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 : string
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 + v7 : string
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 : string
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 : string
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 : string
|
||||
>v0 + v00 + v1 + v2 + v3 : string
|
||||
>v0 + v00 + v1 + v2 : string
|
||||
>v0 + v00 + v1 : string
|
||||
>v0 + v00 : string
|
||||
>v0 : any
|
||||
>v00 : any
|
||||
>v00 : string
|
||||
>v1 : number
|
||||
>v2 : any
|
||||
>v3 : any
|
||||
@@ -48,24 +48,24 @@ for (let x of []) {
|
||||
}
|
||||
|
||||
for (let x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
var v00 = x;
|
||||
>v00 : any
|
||||
>x : any
|
||||
>v00 : string
|
||||
>x : string
|
||||
|
||||
(function() { return x + v00});
|
||||
>(function() { return x + v00}) : () => any
|
||||
>function() { return x + v00} : () => any
|
||||
>x + v00 : any
|
||||
>x : any
|
||||
>v00 : any
|
||||
>(function() { return x + v00}) : () => string
|
||||
>function() { return x + v00} : () => string
|
||||
>x + v00 : string
|
||||
>x : string
|
||||
>v00 : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
}
|
||||
|
||||
for (let x = 0; x < 1; ++x) {
|
||||
@@ -302,20 +302,20 @@ for (let y = 0; y < 1; ++y) {
|
||||
|
||||
//======const
|
||||
export function exportedFoo2() {
|
||||
>exportedFoo2 : () => any
|
||||
>exportedFoo2 : () => string
|
||||
|
||||
return v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c + v8_c;
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c + v8_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c : any
|
||||
>v0_c + v00_c + v1_c : any
|
||||
>v0_c + v00_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c + v8_c : string
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c : string
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c : string
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c : string
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c : string
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c : string
|
||||
>v0_c + v00_c + v1_c + v2_c : string
|
||||
>v0_c + v00_c + v1_c : string
|
||||
>v0_c + v00_c : string
|
||||
>v0_c : any
|
||||
>v00_c : any
|
||||
>v00_c : string
|
||||
>v1_c : number
|
||||
>v2_c : number
|
||||
>v3_c : number
|
||||
@@ -348,24 +348,24 @@ for (const x of []) {
|
||||
}
|
||||
|
||||
for (const x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
var v00_c = x;
|
||||
>v00_c : any
|
||||
>x : any
|
||||
>v00_c : string
|
||||
>x : string
|
||||
|
||||
(function() { return x + v00});
|
||||
>(function() { return x + v00}) : () => any
|
||||
>function() { return x + v00} : () => any
|
||||
>x + v00 : any
|
||||
>x : any
|
||||
>v00 : any
|
||||
>(function() { return x + v00}) : () => string
|
||||
>function() { return x + v00} : () => string
|
||||
>x + v00 : string
|
||||
>x : string
|
||||
>v00 : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
}
|
||||
|
||||
for (const x = 0; x < 1;) {
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
|
||||
//======let
|
||||
export function exportedFoo() {
|
||||
>exportedFoo : () => any
|
||||
>exportedFoo : () => string
|
||||
|
||||
return v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8;
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 : any
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 + v7 : any
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 : any
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 : any
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 : any
|
||||
>v0 + v00 + v1 + v2 + v3 : any
|
||||
>v0 + v00 + v1 + v2 : any
|
||||
>v0 + v00 + v1 : any
|
||||
>v0 + v00 : any
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 : string
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 + v7 : string
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 : string
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 + v5 : string
|
||||
>v0 + v00 + v1 + v2 + v3 + v4 : string
|
||||
>v0 + v00 + v1 + v2 + v3 : string
|
||||
>v0 + v00 + v1 + v2 : string
|
||||
>v0 + v00 + v1 : string
|
||||
>v0 + v00 : string
|
||||
>v0 : any
|
||||
>v00 : any
|
||||
>v00 : string
|
||||
>v1 : number
|
||||
>v2 : any
|
||||
>v3 : any
|
||||
@@ -48,24 +48,24 @@ for (let x of []) {
|
||||
}
|
||||
|
||||
for (let x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
var v00 = x;
|
||||
>v00 : any
|
||||
>x : any
|
||||
>v00 : string
|
||||
>x : string
|
||||
|
||||
(function() { return x + v00});
|
||||
>(function() { return x + v00}) : () => any
|
||||
>function() { return x + v00} : () => any
|
||||
>x + v00 : any
|
||||
>x : any
|
||||
>v00 : any
|
||||
>(function() { return x + v00}) : () => string
|
||||
>function() { return x + v00} : () => string
|
||||
>x + v00 : string
|
||||
>x : string
|
||||
>v00 : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
}
|
||||
|
||||
for (let x = 0; x < 1; ++x) {
|
||||
@@ -302,20 +302,20 @@ for (let y = 0; y < 1; ++y) {
|
||||
|
||||
//======const
|
||||
export function exportedFoo2() {
|
||||
>exportedFoo2 : () => any
|
||||
>exportedFoo2 : () => string
|
||||
|
||||
return v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c + v8_c;
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c + v8_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c : any
|
||||
>v0_c + v00_c + v1_c : any
|
||||
>v0_c + v00_c : any
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c + v8_c : string
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c : string
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c : string
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c : string
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c + v4_c : string
|
||||
>v0_c + v00_c + v1_c + v2_c + v3_c : string
|
||||
>v0_c + v00_c + v1_c + v2_c : string
|
||||
>v0_c + v00_c + v1_c : string
|
||||
>v0_c + v00_c : string
|
||||
>v0_c : any
|
||||
>v00_c : any
|
||||
>v00_c : string
|
||||
>v1_c : number
|
||||
>v2_c : number
|
||||
>v3_c : number
|
||||
@@ -348,24 +348,24 @@ for (const x of []) {
|
||||
}
|
||||
|
||||
for (const x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
var v00_c = x;
|
||||
>v00_c : any
|
||||
>x : any
|
||||
>v00_c : string
|
||||
>x : string
|
||||
|
||||
(function() { return x + v00});
|
||||
>(function() { return x + v00}) : () => any
|
||||
>function() { return x + v00} : () => any
|
||||
>x + v00 : any
|
||||
>x : any
|
||||
>v00 : any
|
||||
>(function() { return x + v00}) : () => string
|
||||
>function() { return x + v00} : () => string
|
||||
>x + v00 : string
|
||||
>x : string
|
||||
>v00 : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
}
|
||||
|
||||
for (const x = 0; x < 1;) {
|
||||
|
||||
@@ -20,7 +20,7 @@ function foo00(x) {
|
||||
var v = x;
|
||||
(function() { return x + v });
|
||||
(() => x + v);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -159,7 +159,7 @@ function foo00_c(x) {
|
||||
var v = x;
|
||||
(function() { return x + v });
|
||||
(() => x + v);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -303,7 +303,7 @@ function foo00(x) {
|
||||
v = x_2;
|
||||
(function () { return x_2 + v; });
|
||||
(function () { return x_2 + v; });
|
||||
if (x_2 == 1) {
|
||||
if (x_2 == "1") {
|
||||
return { value: void 0 };
|
||||
}
|
||||
};
|
||||
@@ -471,7 +471,7 @@ function foo00_c(x) {
|
||||
v = x_12;
|
||||
(function () { return x_12 + v; });
|
||||
(function () { return x_12 + v; });
|
||||
if (x_12 == 1) {
|
||||
if (x_12 == "1") {
|
||||
return { value: void 0 };
|
||||
}
|
||||
};
|
||||
|
||||
@@ -54,7 +54,7 @@ function foo00(x) {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop5.ts, 17, 12))
|
||||
>v : Symbol(v, Decl(capturedLetConstInLoop5.ts, 18, 11))
|
||||
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop5.ts, 17, 12))
|
||||
|
||||
return;
|
||||
@@ -395,7 +395,7 @@ function foo00_c(x) {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop5.ts, 156, 14))
|
||||
>v : Symbol(v, Decl(capturedLetConstInLoop5.ts, 157, 11))
|
||||
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop5.ts, 156, 14))
|
||||
|
||||
return;
|
||||
|
||||
@@ -50,31 +50,31 @@ function foo00(x) {
|
||||
>x : any
|
||||
|
||||
for (let x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
var v = x;
|
||||
>v : any
|
||||
>x : any
|
||||
>v : string
|
||||
>x : string
|
||||
|
||||
(function() { return x + v });
|
||||
>(function() { return x + v }) : () => any
|
||||
>function() { return x + v } : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(function() { return x + v }) : () => string
|
||||
>function() { return x + v } : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
|
||||
(() => x + v);
|
||||
>(() => x + v) : () => any
|
||||
>() => x + v : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(() => x + v) : () => string
|
||||
>() => x + v : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -83,7 +83,7 @@ function foo00(x) {
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : any
|
||||
>v : string
|
||||
}
|
||||
|
||||
function foo1(x) {
|
||||
@@ -525,31 +525,31 @@ function foo00_c(x) {
|
||||
>x : any
|
||||
|
||||
for (const x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
var v = x;
|
||||
>v : any
|
||||
>x : any
|
||||
>v : string
|
||||
>x : string
|
||||
|
||||
(function() { return x + v });
|
||||
>(function() { return x + v }) : () => any
|
||||
>function() { return x + v } : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(function() { return x + v }) : () => string
|
||||
>function() { return x + v } : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
|
||||
(() => x + v);
|
||||
>(() => x + v) : () => any
|
||||
>() => x + v : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(() => x + v) : () => string
|
||||
>() => x + v : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -558,7 +558,7 @@ function foo00_c(x) {
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : any
|
||||
>v : string
|
||||
}
|
||||
|
||||
function foo1_c(x) {
|
||||
|
||||
@@ -21,7 +21,7 @@ function foo00(x) {
|
||||
var v = x;
|
||||
(function() { return x + v });
|
||||
(() => x + v);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -160,7 +160,7 @@ function foo00_c(x) {
|
||||
var v = x;
|
||||
(function() { return x + v });
|
||||
(() => x + v);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -298,7 +298,7 @@ function foo00(x) {
|
||||
var v = x;
|
||||
(function () { return x + v; });
|
||||
(() => x + v);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -416,7 +416,7 @@ function foo00_c(x) {
|
||||
var v = x;
|
||||
(function () { return x + v; });
|
||||
(() => x + v);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ function foo00(x) {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop5_ES6.ts, 18, 12))
|
||||
>v : Symbol(v, Decl(capturedLetConstInLoop5_ES6.ts, 19, 11))
|
||||
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop5_ES6.ts, 18, 12))
|
||||
|
||||
return;
|
||||
@@ -396,7 +396,7 @@ function foo00_c(x) {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop5_ES6.ts, 157, 14))
|
||||
>v : Symbol(v, Decl(capturedLetConstInLoop5_ES6.ts, 158, 11))
|
||||
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop5_ES6.ts, 157, 14))
|
||||
|
||||
return;
|
||||
|
||||
@@ -51,31 +51,31 @@ function foo00(x) {
|
||||
>x : any
|
||||
|
||||
for (let x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
var v = x;
|
||||
>v : any
|
||||
>x : any
|
||||
>v : string
|
||||
>x : string
|
||||
|
||||
(function() { return x + v });
|
||||
>(function() { return x + v }) : () => any
|
||||
>function() { return x + v } : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(function() { return x + v }) : () => string
|
||||
>function() { return x + v } : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
|
||||
(() => x + v);
|
||||
>(() => x + v) : () => any
|
||||
>() => x + v : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(() => x + v) : () => string
|
||||
>() => x + v : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ function foo00(x) {
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : any
|
||||
>v : string
|
||||
}
|
||||
|
||||
function foo1(x) {
|
||||
@@ -526,31 +526,31 @@ function foo00_c(x) {
|
||||
>x : any
|
||||
|
||||
for (const x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
var v = x;
|
||||
>v : any
|
||||
>x : any
|
||||
>v : string
|
||||
>x : string
|
||||
|
||||
(function() { return x + v });
|
||||
>(function() { return x + v }) : () => any
|
||||
>function() { return x + v } : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(function() { return x + v }) : () => string
|
||||
>function() { return x + v } : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
|
||||
(() => x + v);
|
||||
>(() => x + v) : () => any
|
||||
>() => x + v : () => any
|
||||
>x + v : any
|
||||
>x : any
|
||||
>v : any
|
||||
>(() => x + v) : () => string
|
||||
>() => x + v : () => string
|
||||
>x + v : string
|
||||
>x : string
|
||||
>v : string
|
||||
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -559,7 +559,7 @@ function foo00_c(x) {
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : any
|
||||
>v : string
|
||||
}
|
||||
|
||||
function foo1_c(x) {
|
||||
|
||||
@@ -14,10 +14,10 @@ for (let x of []) {
|
||||
for (let x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -133,10 +133,10 @@ for (const x of []) {
|
||||
for (const x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -259,10 +259,10 @@ for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _loop_2 = function(x) {
|
||||
(function () { return x; });
|
||||
(function () { return x; });
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return "break";
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
return "continue";
|
||||
}
|
||||
};
|
||||
@@ -417,10 +417,10 @@ for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var _loop_12 = function(x) {
|
||||
(function () { return x; });
|
||||
(function () { return x; });
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return "break";
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
return "continue";
|
||||
}
|
||||
};
|
||||
|
||||
@@ -30,12 +30,12 @@ for (let x in []) {
|
||||
(() => x);
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop6.ts, 12, 8))
|
||||
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop6.ts, 12, 8))
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop6.ts, 12, 8))
|
||||
|
||||
continue;
|
||||
@@ -272,12 +272,12 @@ for (const x in []) {
|
||||
(() => x);
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop6.ts, 131, 10))
|
||||
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop6.ts, 131, 10))
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop6.ts, 131, 10))
|
||||
|
||||
continue;
|
||||
|
||||
@@ -31,30 +31,30 @@ for (let x of []) {
|
||||
}
|
||||
|
||||
for (let x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
(function() { return x});
|
||||
>(function() { return x}) : () => any
|
||||
>function() { return x} : () => any
|
||||
>x : any
|
||||
>(function() { return x}) : () => string
|
||||
>function() { return x} : () => string
|
||||
>x : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
>x == 2 : boolean
|
||||
>x : any
|
||||
>2 : number
|
||||
if (x == "2") {
|
||||
>x == "2" : boolean
|
||||
>x : string
|
||||
>"2" : string
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -396,30 +396,30 @@ for (const x of []) {
|
||||
}
|
||||
|
||||
for (const x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
(function() { return x});
|
||||
>(function() { return x}) : () => any
|
||||
>function() { return x} : () => any
|
||||
>x : any
|
||||
>(function() { return x}) : () => string
|
||||
>function() { return x} : () => string
|
||||
>x : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
>x == 2 : boolean
|
||||
>x : any
|
||||
>2 : number
|
||||
if (x == "2") {
|
||||
>x == "2" : boolean
|
||||
>x : string
|
||||
>"2" : string
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -14,10 +14,10 @@ for (let x of []) {
|
||||
for (let x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -133,10 +133,10 @@ for (const x of []) {
|
||||
for (const x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -253,10 +253,10 @@ for (let x of []) {
|
||||
for (let x in []) {
|
||||
(function () { return x; });
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -360,10 +360,10 @@ for (const x of []) {
|
||||
for (const x in []) {
|
||||
(function () { return x; });
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,12 +30,12 @@ for (let x in []) {
|
||||
(() => x);
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop6_ES6.ts, 12, 8))
|
||||
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop6_ES6.ts, 12, 8))
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop6_ES6.ts, 12, 8))
|
||||
|
||||
continue;
|
||||
@@ -272,12 +272,12 @@ for (const x in []) {
|
||||
(() => x);
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop6_ES6.ts, 131, 10))
|
||||
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop6_ES6.ts, 131, 10))
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop6_ES6.ts, 131, 10))
|
||||
|
||||
continue;
|
||||
|
||||
@@ -31,30 +31,30 @@ for (let x of []) {
|
||||
}
|
||||
|
||||
for (let x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
(function() { return x});
|
||||
>(function() { return x}) : () => any
|
||||
>function() { return x} : () => any
|
||||
>x : any
|
||||
>(function() { return x}) : () => string
|
||||
>function() { return x} : () => string
|
||||
>x : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
>x == 2 : boolean
|
||||
>x : any
|
||||
>2 : number
|
||||
if (x == "2") {
|
||||
>x == "2" : boolean
|
||||
>x : string
|
||||
>"2" : string
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -396,30 +396,30 @@ for (const x of []) {
|
||||
}
|
||||
|
||||
for (const x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
(function() { return x});
|
||||
>(function() { return x}) : () => any
|
||||
>function() { return x} : () => any
|
||||
>x : any
|
||||
>(function() { return x}) : () => string
|
||||
>function() { return x} : () => string
|
||||
>x : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
>x == 2 : boolean
|
||||
>x : any
|
||||
>2 : number
|
||||
if (x == "2") {
|
||||
>x == "2" : boolean
|
||||
>x : string
|
||||
>"2" : string
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -22,16 +22,16 @@ l00:
|
||||
for (let x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break l00;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue l00;
|
||||
}
|
||||
}
|
||||
@@ -210,16 +210,16 @@ l00_c:
|
||||
for (const x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break l00_c;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue l00_c;
|
||||
}
|
||||
}
|
||||
@@ -406,16 +406,16 @@ l0: for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _loop_2 = function(x) {
|
||||
(function () { return x; });
|
||||
(function () { return x; });
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return "break";
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return "break-l00";
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
return "continue";
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
return "continue-l00";
|
||||
}
|
||||
};
|
||||
@@ -664,16 +664,16 @@ l0_c: for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var _loop_12 = function(x) {
|
||||
(function () { return x; });
|
||||
(function () { return x; });
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return "break";
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return "break-l00_c";
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
return "continue";
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
return "continue-l00_c";
|
||||
}
|
||||
};
|
||||
|
||||
@@ -42,22 +42,22 @@ for (let x in []) {
|
||||
(() => x);
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7.ts, 20, 8))
|
||||
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7.ts, 20, 8))
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7.ts, 20, 8))
|
||||
|
||||
break l00;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7.ts, 20, 8))
|
||||
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7.ts, 20, 8))
|
||||
|
||||
continue l00;
|
||||
@@ -393,22 +393,22 @@ for (const x in []) {
|
||||
(() => x);
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7.ts, 208, 10))
|
||||
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7.ts, 208, 10))
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7.ts, 208, 10))
|
||||
|
||||
break l00_c;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7.ts, 208, 10))
|
||||
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7.ts, 208, 10))
|
||||
|
||||
continue l00_c;
|
||||
|
||||
@@ -53,45 +53,45 @@ l00:
|
||||
>l00 : any
|
||||
|
||||
for (let x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
(function() { return x});
|
||||
>(function() { return x}) : () => any
|
||||
>function() { return x} : () => any
|
||||
>x : any
|
||||
>(function() { return x}) : () => string
|
||||
>function() { return x} : () => string
|
||||
>x : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
break l00;
|
||||
>l00 : any
|
||||
}
|
||||
if (x == 2) {
|
||||
>x == 2 : boolean
|
||||
>x : any
|
||||
>2 : number
|
||||
if (x == "2") {
|
||||
>x == "2" : boolean
|
||||
>x : string
|
||||
>"2" : string
|
||||
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
>x == 2 : boolean
|
||||
>x : any
|
||||
>2 : number
|
||||
if (x == "2") {
|
||||
>x == "2" : boolean
|
||||
>x : string
|
||||
>"2" : string
|
||||
|
||||
continue l00;
|
||||
>l00 : any
|
||||
@@ -607,45 +607,45 @@ l00_c:
|
||||
>l00_c : any
|
||||
|
||||
for (const x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
(function() { return x});
|
||||
>(function() { return x}) : () => any
|
||||
>function() { return x} : () => any
|
||||
>x : any
|
||||
>(function() { return x}) : () => string
|
||||
>function() { return x} : () => string
|
||||
>x : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
break l00_c;
|
||||
>l00_c : any
|
||||
}
|
||||
if (x == 2) {
|
||||
>x == 2 : boolean
|
||||
>x : any
|
||||
>2 : number
|
||||
if (x == "2") {
|
||||
>x == "2" : boolean
|
||||
>x : string
|
||||
>"2" : string
|
||||
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
>x == 2 : boolean
|
||||
>x : any
|
||||
>2 : number
|
||||
if (x == "2") {
|
||||
>x == "2" : boolean
|
||||
>x : string
|
||||
>"2" : string
|
||||
|
||||
continue l00_c;
|
||||
>l00_c : any
|
||||
|
||||
@@ -22,16 +22,16 @@ l00:
|
||||
for (let x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break l00;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue l00;
|
||||
}
|
||||
}
|
||||
@@ -210,16 +210,16 @@ l00_c:
|
||||
for (const x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break l00_c;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue l00_c;
|
||||
}
|
||||
}
|
||||
@@ -396,16 +396,16 @@ l0: for (let x of []) {
|
||||
l00: for (let x in []) {
|
||||
(function () { return x; });
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break l00;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue l00;
|
||||
}
|
||||
}
|
||||
@@ -563,16 +563,16 @@ l0_c: for (const x of []) {
|
||||
l00_c: for (const x in []) {
|
||||
(function () { return x; });
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break l00_c;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue l00_c;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,22 +42,22 @@ for (let x in []) {
|
||||
(() => x);
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7_ES6.ts, 20, 8))
|
||||
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7_ES6.ts, 20, 8))
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7_ES6.ts, 20, 8))
|
||||
|
||||
break l00;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7_ES6.ts, 20, 8))
|
||||
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7_ES6.ts, 20, 8))
|
||||
|
||||
continue l00;
|
||||
@@ -393,22 +393,22 @@ for (const x in []) {
|
||||
(() => x);
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7_ES6.ts, 208, 10))
|
||||
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7_ES6.ts, 208, 10))
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7_ES6.ts, 208, 10))
|
||||
|
||||
break l00_c;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7_ES6.ts, 208, 10))
|
||||
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
>x : Symbol(x, Decl(capturedLetConstInLoop7_ES6.ts, 208, 10))
|
||||
|
||||
continue l00_c;
|
||||
|
||||
@@ -53,45 +53,45 @@ l00:
|
||||
>l00 : any
|
||||
|
||||
for (let x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
(function() { return x});
|
||||
>(function() { return x}) : () => any
|
||||
>function() { return x} : () => any
|
||||
>x : any
|
||||
>(function() { return x}) : () => string
|
||||
>function() { return x} : () => string
|
||||
>x : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
break l00;
|
||||
>l00 : any
|
||||
}
|
||||
if (x == 2) {
|
||||
>x == 2 : boolean
|
||||
>x : any
|
||||
>2 : number
|
||||
if (x == "2") {
|
||||
>x == "2" : boolean
|
||||
>x : string
|
||||
>"2" : string
|
||||
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
>x == 2 : boolean
|
||||
>x : any
|
||||
>2 : number
|
||||
if (x == "2") {
|
||||
>x == "2" : boolean
|
||||
>x : string
|
||||
>"2" : string
|
||||
|
||||
continue l00;
|
||||
>l00 : any
|
||||
@@ -607,45 +607,45 @@ l00_c:
|
||||
>l00_c : any
|
||||
|
||||
for (const x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
(function() { return x});
|
||||
>(function() { return x}) : () => any
|
||||
>function() { return x} : () => any
|
||||
>x : any
|
||||
>(function() { return x}) : () => string
|
||||
>function() { return x} : () => string
|
||||
>x : string
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
>(() => x) : () => string
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
>x == 1 : boolean
|
||||
>x : any
|
||||
>1 : number
|
||||
if (x == "1") {
|
||||
>x == "1" : boolean
|
||||
>x : string
|
||||
>"1" : string
|
||||
|
||||
break l00_c;
|
||||
>l00_c : any
|
||||
}
|
||||
if (x == 2) {
|
||||
>x == 2 : boolean
|
||||
>x : any
|
||||
>2 : number
|
||||
if (x == "2") {
|
||||
>x == "2" : boolean
|
||||
>x : string
|
||||
>"2" : string
|
||||
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
>x == 2 : boolean
|
||||
>x : any
|
||||
>2 : number
|
||||
if (x == "2") {
|
||||
>x == "2" : boolean
|
||||
>x : string
|
||||
>"2" : string
|
||||
|
||||
continue l00_c;
|
||||
>l00_c : any
|
||||
|
||||
@@ -139,23 +139,23 @@ do {
|
||||
>true : boolean
|
||||
|
||||
for (let x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
use(x);
|
||||
>use(x) : any
|
||||
>use : (a: any) => any
|
||||
>x : any
|
||||
>x : string
|
||||
}
|
||||
|
||||
for (const x in []) {
|
||||
>x : any
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
use(x);
|
||||
>use(x) : any
|
||||
>use : (a: any) => any
|
||||
>x : any
|
||||
>x : string
|
||||
}
|
||||
|
||||
for (const x of []) {
|
||||
|
||||
@@ -2,10 +2,12 @@ tests/cases/compiler/duplicateLocalVariable1.ts(2,4): error TS1005: ';' expected
|
||||
tests/cases/compiler/duplicateLocalVariable1.ts(2,11): error TS1146: Declaration expected.
|
||||
tests/cases/compiler/duplicateLocalVariable1.ts(2,13): error TS2304: Cannot find name 'commonjs'.
|
||||
tests/cases/compiler/duplicateLocalVariable1.ts(12,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/compiler/duplicateLocalVariable1.ts(187,22): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'.
|
||||
tests/cases/compiler/duplicateLocalVariable1.ts(187,22): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'string', but here has type 'number'.
|
||||
tests/cases/compiler/duplicateLocalVariable1.ts(187,29): error TS2365: Operator '<' cannot be applied to types 'string' and 'number'.
|
||||
tests/cases/compiler/duplicateLocalVariable1.ts(187,37): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/duplicateLocalVariable1.ts (5 errors) ====
|
||||
==== tests/cases/compiler/duplicateLocalVariable1.ts (7 errors) ====
|
||||
|
||||
/ /@module: commonjs
|
||||
~
|
||||
@@ -202,7 +204,11 @@ tests/cases/compiler/duplicateLocalVariable1.ts(187,22): error TS2403: Subsequen
|
||||
var bytes = [];
|
||||
for (var i = 0; i < 14; i++) {
|
||||
~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'.
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'string', but here has type 'number'.
|
||||
~~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'number'.
|
||||
~
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
||||
bytes.push(fb.readByte());
|
||||
}
|
||||
var expected = [0xEF, 0xBB, 0xBF, 0x54, 0xC3, 0xA8, 0xE1, 0xB4, 0xA3, 0xE2, 0x80, 0xA0, 0x0D, 0x0A];
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
tests/cases/compiler/duplicateLocalVariable2.ts(27,22): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'.
|
||||
tests/cases/compiler/duplicateLocalVariable2.ts(27,22): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'string', but here has type 'number'.
|
||||
tests/cases/compiler/duplicateLocalVariable2.ts(27,29): error TS2365: Operator '<' cannot be applied to types 'string' and 'number'.
|
||||
tests/cases/compiler/duplicateLocalVariable2.ts(27,37): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/duplicateLocalVariable2.ts (1 errors) ====
|
||||
==== tests/cases/compiler/duplicateLocalVariable2.ts (3 errors) ====
|
||||
export class TestCase {
|
||||
constructor (public name: string, public test: ()=>boolean, public errorMessageRegEx?: string) {
|
||||
}
|
||||
@@ -30,7 +32,11 @@ tests/cases/compiler/duplicateLocalVariable2.ts(27,22): error TS2403: Subsequent
|
||||
var bytes = [];
|
||||
for (var i = 0; i < 14; i++) {
|
||||
~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'.
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'string', but here has type 'number'.
|
||||
~~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'string' and 'number'.
|
||||
~
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
||||
bytes.push(fb.readByte());
|
||||
}
|
||||
var expected = [0xEF];
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
//// [for-inStatementsArray.ts]
|
||||
let a: Date[];
|
||||
let b: boolean[];
|
||||
|
||||
for (let x in a) {
|
||||
let a1 = a[x];
|
||||
let a2 = a[(x)];
|
||||
let a3 = a[+x];
|
||||
let b1 = b[x];
|
||||
let b2 = b[(x)];
|
||||
let b3 = b[+x];
|
||||
}
|
||||
|
||||
for (let x in a) {
|
||||
for (let y in a) {
|
||||
for (let z in a) {
|
||||
let a1 = a[x];
|
||||
let a2 = a[y];
|
||||
let a3 = a[z];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let i: string;
|
||||
let j: string;
|
||||
for (i in a) {
|
||||
for (j in b) {
|
||||
let a1 = a[i];
|
||||
let a2 = a[j];
|
||||
}
|
||||
}
|
||||
|
||||
var s: string;
|
||||
for (var s in a) {
|
||||
let a1 = a[s];
|
||||
}
|
||||
for (s in a) {
|
||||
let a1 = a[s];
|
||||
}
|
||||
|
||||
|
||||
//// [for-inStatementsArray.js]
|
||||
var a;
|
||||
var b;
|
||||
for (var x in a) {
|
||||
var a1 = a[x];
|
||||
var a2 = a[(x)];
|
||||
var a3 = a[+x];
|
||||
var b1 = b[x];
|
||||
var b2 = b[(x)];
|
||||
var b3 = b[+x];
|
||||
}
|
||||
for (var x in a) {
|
||||
for (var y in a) {
|
||||
for (var z in a) {
|
||||
var a1 = a[x];
|
||||
var a2 = a[y];
|
||||
var a3 = a[z];
|
||||
}
|
||||
}
|
||||
}
|
||||
var i;
|
||||
var j;
|
||||
for (i in a) {
|
||||
for (j in b) {
|
||||
var a1 = a[i];
|
||||
var a2 = a[j];
|
||||
}
|
||||
}
|
||||
var s;
|
||||
for (var s in a) {
|
||||
var a1 = a[s];
|
||||
}
|
||||
for (s in a) {
|
||||
var a1 = a[s];
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
=== tests/cases/conformance/statements/for-inStatements/for-inStatementsArray.ts ===
|
||||
let a: Date[];
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
>Date : Symbol(Date, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
let b: boolean[];
|
||||
>b : Symbol(b, Decl(for-inStatementsArray.ts, 1, 3))
|
||||
|
||||
for (let x in a) {
|
||||
>x : Symbol(x, Decl(for-inStatementsArray.ts, 3, 8))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
|
||||
let a1 = a[x];
|
||||
>a1 : Symbol(a1, Decl(for-inStatementsArray.ts, 4, 7))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
>x : Symbol(x, Decl(for-inStatementsArray.ts, 3, 8))
|
||||
|
||||
let a2 = a[(x)];
|
||||
>a2 : Symbol(a2, Decl(for-inStatementsArray.ts, 5, 7))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
>x : Symbol(x, Decl(for-inStatementsArray.ts, 3, 8))
|
||||
|
||||
let a3 = a[+x];
|
||||
>a3 : Symbol(a3, Decl(for-inStatementsArray.ts, 6, 7))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
>x : Symbol(x, Decl(for-inStatementsArray.ts, 3, 8))
|
||||
|
||||
let b1 = b[x];
|
||||
>b1 : Symbol(b1, Decl(for-inStatementsArray.ts, 7, 7))
|
||||
>b : Symbol(b, Decl(for-inStatementsArray.ts, 1, 3))
|
||||
>x : Symbol(x, Decl(for-inStatementsArray.ts, 3, 8))
|
||||
|
||||
let b2 = b[(x)];
|
||||
>b2 : Symbol(b2, Decl(for-inStatementsArray.ts, 8, 7))
|
||||
>b : Symbol(b, Decl(for-inStatementsArray.ts, 1, 3))
|
||||
>x : Symbol(x, Decl(for-inStatementsArray.ts, 3, 8))
|
||||
|
||||
let b3 = b[+x];
|
||||
>b3 : Symbol(b3, Decl(for-inStatementsArray.ts, 9, 7))
|
||||
>b : Symbol(b, Decl(for-inStatementsArray.ts, 1, 3))
|
||||
>x : Symbol(x, Decl(for-inStatementsArray.ts, 3, 8))
|
||||
}
|
||||
|
||||
for (let x in a) {
|
||||
>x : Symbol(x, Decl(for-inStatementsArray.ts, 12, 8))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
|
||||
for (let y in a) {
|
||||
>y : Symbol(y, Decl(for-inStatementsArray.ts, 13, 12))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
|
||||
for (let z in a) {
|
||||
>z : Symbol(z, Decl(for-inStatementsArray.ts, 14, 16))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
|
||||
let a1 = a[x];
|
||||
>a1 : Symbol(a1, Decl(for-inStatementsArray.ts, 15, 15))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
>x : Symbol(x, Decl(for-inStatementsArray.ts, 12, 8))
|
||||
|
||||
let a2 = a[y];
|
||||
>a2 : Symbol(a2, Decl(for-inStatementsArray.ts, 16, 15))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
>y : Symbol(y, Decl(for-inStatementsArray.ts, 13, 12))
|
||||
|
||||
let a3 = a[z];
|
||||
>a3 : Symbol(a3, Decl(for-inStatementsArray.ts, 17, 15))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
>z : Symbol(z, Decl(for-inStatementsArray.ts, 14, 16))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let i: string;
|
||||
>i : Symbol(i, Decl(for-inStatementsArray.ts, 22, 3))
|
||||
|
||||
let j: string;
|
||||
>j : Symbol(j, Decl(for-inStatementsArray.ts, 23, 3))
|
||||
|
||||
for (i in a) {
|
||||
>i : Symbol(i, Decl(for-inStatementsArray.ts, 22, 3))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
|
||||
for (j in b) {
|
||||
>j : Symbol(j, Decl(for-inStatementsArray.ts, 23, 3))
|
||||
>b : Symbol(b, Decl(for-inStatementsArray.ts, 1, 3))
|
||||
|
||||
let a1 = a[i];
|
||||
>a1 : Symbol(a1, Decl(for-inStatementsArray.ts, 26, 11))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
>i : Symbol(i, Decl(for-inStatementsArray.ts, 22, 3))
|
||||
|
||||
let a2 = a[j];
|
||||
>a2 : Symbol(a2, Decl(for-inStatementsArray.ts, 27, 11))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
>j : Symbol(j, Decl(for-inStatementsArray.ts, 23, 3))
|
||||
}
|
||||
}
|
||||
|
||||
var s: string;
|
||||
>s : Symbol(s, Decl(for-inStatementsArray.ts, 31, 3), Decl(for-inStatementsArray.ts, 32, 8))
|
||||
|
||||
for (var s in a) {
|
||||
>s : Symbol(s, Decl(for-inStatementsArray.ts, 31, 3), Decl(for-inStatementsArray.ts, 32, 8))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
|
||||
let a1 = a[s];
|
||||
>a1 : Symbol(a1, Decl(for-inStatementsArray.ts, 33, 7))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
>s : Symbol(s, Decl(for-inStatementsArray.ts, 31, 3), Decl(for-inStatementsArray.ts, 32, 8))
|
||||
}
|
||||
for (s in a) {
|
||||
>s : Symbol(s, Decl(for-inStatementsArray.ts, 31, 3), Decl(for-inStatementsArray.ts, 32, 8))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
|
||||
let a1 = a[s];
|
||||
>a1 : Symbol(a1, Decl(for-inStatementsArray.ts, 36, 7))
|
||||
>a : Symbol(a, Decl(for-inStatementsArray.ts, 0, 3))
|
||||
>s : Symbol(s, Decl(for-inStatementsArray.ts, 31, 3), Decl(for-inStatementsArray.ts, 32, 8))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
=== tests/cases/conformance/statements/for-inStatements/for-inStatementsArray.ts ===
|
||||
let a: Date[];
|
||||
>a : Date[]
|
||||
>Date : Date
|
||||
|
||||
let b: boolean[];
|
||||
>b : boolean[]
|
||||
|
||||
for (let x in a) {
|
||||
>x : string
|
||||
>a : Date[]
|
||||
|
||||
let a1 = a[x];
|
||||
>a1 : Date
|
||||
>a[x] : Date
|
||||
>a : Date[]
|
||||
>x : string
|
||||
|
||||
let a2 = a[(x)];
|
||||
>a2 : Date
|
||||
>a[(x)] : Date
|
||||
>a : Date[]
|
||||
>(x) : string
|
||||
>x : string
|
||||
|
||||
let a3 = a[+x];
|
||||
>a3 : Date
|
||||
>a[+x] : Date
|
||||
>a : Date[]
|
||||
>+x : number
|
||||
>x : string
|
||||
|
||||
let b1 = b[x];
|
||||
>b1 : boolean
|
||||
>b[x] : boolean
|
||||
>b : boolean[]
|
||||
>x : string
|
||||
|
||||
let b2 = b[(x)];
|
||||
>b2 : boolean
|
||||
>b[(x)] : boolean
|
||||
>b : boolean[]
|
||||
>(x) : string
|
||||
>x : string
|
||||
|
||||
let b3 = b[+x];
|
||||
>b3 : boolean
|
||||
>b[+x] : boolean
|
||||
>b : boolean[]
|
||||
>+x : number
|
||||
>x : string
|
||||
}
|
||||
|
||||
for (let x in a) {
|
||||
>x : string
|
||||
>a : Date[]
|
||||
|
||||
for (let y in a) {
|
||||
>y : string
|
||||
>a : Date[]
|
||||
|
||||
for (let z in a) {
|
||||
>z : string
|
||||
>a : Date[]
|
||||
|
||||
let a1 = a[x];
|
||||
>a1 : Date
|
||||
>a[x] : Date
|
||||
>a : Date[]
|
||||
>x : string
|
||||
|
||||
let a2 = a[y];
|
||||
>a2 : Date
|
||||
>a[y] : Date
|
||||
>a : Date[]
|
||||
>y : string
|
||||
|
||||
let a3 = a[z];
|
||||
>a3 : Date
|
||||
>a[z] : Date
|
||||
>a : Date[]
|
||||
>z : string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let i: string;
|
||||
>i : string
|
||||
|
||||
let j: string;
|
||||
>j : string
|
||||
|
||||
for (i in a) {
|
||||
>i : string
|
||||
>a : Date[]
|
||||
|
||||
for (j in b) {
|
||||
>j : string
|
||||
>b : boolean[]
|
||||
|
||||
let a1 = a[i];
|
||||
>a1 : Date
|
||||
>a[i] : Date
|
||||
>a : Date[]
|
||||
>i : string
|
||||
|
||||
let a2 = a[j];
|
||||
>a2 : Date
|
||||
>a[j] : Date
|
||||
>a : Date[]
|
||||
>j : string
|
||||
}
|
||||
}
|
||||
|
||||
var s: string;
|
||||
>s : string
|
||||
|
||||
for (var s in a) {
|
||||
>s : string
|
||||
>a : Date[]
|
||||
|
||||
let a1 = a[s];
|
||||
>a1 : Date
|
||||
>a[s] : Date
|
||||
>a : Date[]
|
||||
>s : string
|
||||
}
|
||||
for (s in a) {
|
||||
>s : string
|
||||
>a : Date[]
|
||||
|
||||
let a1 = a[s];
|
||||
>a1 : Date
|
||||
>a[s] : Date
|
||||
>a : Date[]
|
||||
>s : string
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(5,14): error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(6,16): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(7,9): error TS2365: Operator '===' cannot be applied to types 'string' and 'number'.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(9,16): error TS2339: Property 'unknownProperty' does not exist on type 'string'.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(13,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'number', but here has type 'string'.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts(17,10): error TS2403: Subsequent variable declarations must have the same type. Variable 'j' must be of type 'any', but here has type 'string'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-inStatements/for-inStatementsArrayErrors.ts (6 errors) ====
|
||||
|
||||
let a: Date[];
|
||||
|
||||
for (let x in a) {
|
||||
let a1 = a[x + 1];
|
||||
~~~~~~~~
|
||||
!!! error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'.
|
||||
let a2 = a[x - 1];
|
||||
~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
if (x === 1) {
|
||||
~~~~~~~
|
||||
!!! error TS2365: Operator '===' cannot be applied to types 'string' and 'number'.
|
||||
}
|
||||
let a3 = x.unknownProperty;
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2339: Property 'unknownProperty' does not exist on type 'string'.
|
||||
}
|
||||
|
||||
var i: number;
|
||||
for (var i in a ) {
|
||||
~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'number', but here has type 'string'.
|
||||
}
|
||||
|
||||
var j: any;
|
||||
for (var j in a ) {
|
||||
~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'j' must be of type 'any', but here has type 'string'.
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//// [for-inStatementsArrayErrors.ts]
|
||||
|
||||
let a: Date[];
|
||||
|
||||
for (let x in a) {
|
||||
let a1 = a[x + 1];
|
||||
let a2 = a[x - 1];
|
||||
if (x === 1) {
|
||||
}
|
||||
let a3 = x.unknownProperty;
|
||||
}
|
||||
|
||||
var i: number;
|
||||
for (var i in a ) {
|
||||
}
|
||||
|
||||
var j: any;
|
||||
for (var j in a ) {
|
||||
}
|
||||
|
||||
|
||||
//// [for-inStatementsArrayErrors.js]
|
||||
var a;
|
||||
for (var x in a) {
|
||||
var a1 = a[x + 1];
|
||||
var a2 = a[x - 1];
|
||||
if (x === 1) {
|
||||
}
|
||||
var a3 = x.unknownProperty;
|
||||
}
|
||||
var i;
|
||||
for (var i in a) {
|
||||
}
|
||||
var j;
|
||||
for (var j in a) {
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring.ts(1,10): error TS2461: Type 'string' is not an array type.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring.ts(1,10): error TS2491: The left-hand side of a 'for...in' statement cannot be a destructuring pattern.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring.ts (1 errors) ====
|
||||
==== tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring.ts (2 errors) ====
|
||||
for (var [a, b] in []) {}
|
||||
~~~~~~
|
||||
!!! error TS2461: Type 'string' is not an array type.
|
||||
~~~~~~
|
||||
!!! error TS2491: The left-hand side of a 'for...in' statement cannot be a destructuring pattern.
|
||||
@@ -1,7 +1,13 @@
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring2.ts(1,10): error TS2491: The left-hand side of a 'for...in' statement cannot be a destructuring pattern.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring2.ts(1,11): error TS2459: Type 'string' has no property 'a' and no string index signature.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring2.ts(1,14): error TS2459: Type 'string' has no property 'b' and no string index signature.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring2.ts (1 errors) ====
|
||||
==== tests/cases/conformance/statements/for-inStatements/for-inStatementsDestructuring2.ts (3 errors) ====
|
||||
for (var {a, b} in []) {}
|
||||
~~~~~~
|
||||
!!! error TS2491: The left-hand side of a 'for...in' statement cannot be a destructuring pattern.
|
||||
!!! error TS2491: The left-hand side of a 'for...in' statement cannot be a destructuring pattern.
|
||||
~
|
||||
!!! error TS2459: Type 'string' has no property 'a' and no string index signature.
|
||||
~
|
||||
!!! error TS2459: Type 'string' has no property 'b' and no string index signature.
|
||||
@@ -7,7 +7,6 @@ tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(1
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(18,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(19,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(20,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(21,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(22,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(29,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(38,23): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
@@ -16,7 +15,7 @@ tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(5
|
||||
tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(62,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
|
||||
|
||||
==== tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts (16 errors) ====
|
||||
==== tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts (15 errors) ====
|
||||
var aNumber: number;
|
||||
for (aNumber in {}) { }
|
||||
~~~~~~~
|
||||
@@ -56,8 +55,6 @@ tests/cases/conformance/statements/for-inStatements/for-inStatementsInvalid.ts(6
|
||||
~~~~~~~~~~
|
||||
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
for (var x in 42 ? d[x] : c[x]) { }
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
for (var x in c[23]) { }
|
||||
~~~~~
|
||||
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/statements/breakStatements/forInBreakStatements.ts ===
|
||||
|
||||
for(var x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
break;
|
||||
@@ -11,7 +11,7 @@ ONE:
|
||||
>ONE : any
|
||||
|
||||
for(var x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
break ONE;
|
||||
@@ -25,7 +25,7 @@ THREE:
|
||||
>THREE : any
|
||||
|
||||
for(var x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
break THREE;
|
||||
@@ -36,14 +36,14 @@ FOUR:
|
||||
>FOUR : any
|
||||
|
||||
for(var x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
FIVE:
|
||||
>FIVE : any
|
||||
|
||||
for(var x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
break FOUR;
|
||||
@@ -52,14 +52,14 @@ for(var x in {}) {
|
||||
}
|
||||
|
||||
for(var x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
SIX:
|
||||
>SIX : any
|
||||
|
||||
for(var x in {}) break SIX;
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
>SIX : any
|
||||
}
|
||||
@@ -68,11 +68,11 @@ SEVEN:
|
||||
>SEVEN : any
|
||||
|
||||
for (var x in {}) for (var x in {}) for (var x in {}) break SEVEN;
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
>SEVEN : any
|
||||
|
||||
@@ -80,7 +80,7 @@ EIGHT:
|
||||
>EIGHT : any
|
||||
|
||||
for (var x in {}){
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
var fn = function () { }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/statements/continueStatements/forInContinueStatements.ts ===
|
||||
|
||||
for(var x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
continue;
|
||||
@@ -11,7 +11,7 @@ ONE:
|
||||
>ONE : any
|
||||
|
||||
for(var x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
continue ONE;
|
||||
@@ -25,7 +25,7 @@ THREE:
|
||||
>THREE : any
|
||||
|
||||
for(var x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
continue THREE;
|
||||
@@ -36,14 +36,14 @@ FOUR:
|
||||
>FOUR : any
|
||||
|
||||
for(var x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
FIVE:
|
||||
>FIVE : any
|
||||
|
||||
for(var x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
continue FOUR;
|
||||
@@ -52,14 +52,14 @@ for(var x in {}) {
|
||||
}
|
||||
|
||||
for(var x in {}) {
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
SIX:
|
||||
>SIX : any
|
||||
|
||||
for(var x in {}) continue SIX;
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
>SIX : any
|
||||
}
|
||||
@@ -68,11 +68,11 @@ SEVEN:
|
||||
>SEVEN : any
|
||||
|
||||
for (var x in {}) for (var x in {}) for (var x in {}) continue SEVEN;
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
>SEVEN : any
|
||||
|
||||
@@ -80,7 +80,7 @@ EIGHT:
|
||||
>EIGHT : any
|
||||
|
||||
for (var x in {}){
|
||||
>x : any
|
||||
>x : string
|
||||
>{} : {}
|
||||
|
||||
var fn = function () { }
|
||||
|
||||
@@ -3,6 +3,6 @@ var expr: any;
|
||||
>expr : any
|
||||
|
||||
for (var a in expr) {
|
||||
>a : any
|
||||
>a : string
|
||||
>expr : any
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ function F<T>() {
|
||||
>T : T
|
||||
|
||||
for (var a in expr) {
|
||||
>a : any
|
||||
>a : string
|
||||
>expr : T
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ try { } catch (error) {
|
||||
>2147024809 : number
|
||||
}
|
||||
for (var key in this) { }
|
||||
>key : any
|
||||
>key : string
|
||||
>this : any
|
||||
|
||||
class C {
|
||||
@@ -22,7 +22,7 @@ class C {
|
||||
>temp : () => void
|
||||
|
||||
for (var x in this) {
|
||||
>x : any
|
||||
>x : string
|
||||
>this : this
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ class C<T> {
|
||||
>T : T
|
||||
|
||||
for (var p in x) {
|
||||
>p : any
|
||||
>p : string
|
||||
>x : T
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,5 +4,6 @@ declare var React: any;
|
||||
>React : Symbol(React, Decl(jsxEmitAttributeWithPreserve.tsx, 1, 11))
|
||||
|
||||
<foo data/>
|
||||
>foo : Symbol(unknown)
|
||||
>data : Symbol(unknown)
|
||||
|
||||
|
||||
@@ -1,34 +1,68 @@
|
||||
=== tests/cases/compiler/jsxHash.tsx ===
|
||||
var t02 = <a>{0}#</a>;
|
||||
>t02 : Symbol(t02, Decl(jsxHash.tsx, 0, 3))
|
||||
>a : Symbol(unknown)
|
||||
>a : Symbol(unknown)
|
||||
|
||||
var t03 = <a>#{0}</a>;
|
||||
>t03 : Symbol(t03, Decl(jsxHash.tsx, 1, 3))
|
||||
>a : Symbol(unknown)
|
||||
>a : Symbol(unknown)
|
||||
|
||||
var t04 = <a>#{0}#</a>;
|
||||
>t04 : Symbol(t04, Decl(jsxHash.tsx, 2, 3))
|
||||
>a : Symbol(unknown)
|
||||
>a : Symbol(unknown)
|
||||
|
||||
var t05 = <a>#<i></i></a>;
|
||||
>t05 : Symbol(t05, Decl(jsxHash.tsx, 3, 3))
|
||||
>a : Symbol(unknown)
|
||||
>i : Symbol(unknown)
|
||||
>i : Symbol(unknown)
|
||||
>a : Symbol(unknown)
|
||||
|
||||
var t06 = <a>#<i></i></a>;
|
||||
>t06 : Symbol(t06, Decl(jsxHash.tsx, 4, 3))
|
||||
>a : Symbol(unknown)
|
||||
>i : Symbol(unknown)
|
||||
>i : Symbol(unknown)
|
||||
>a : Symbol(unknown)
|
||||
|
||||
var t07 = <a>#<i>#</i></a>;
|
||||
>t07 : Symbol(t07, Decl(jsxHash.tsx, 5, 3))
|
||||
>a : Symbol(unknown)
|
||||
>i : Symbol(unknown)
|
||||
>i : Symbol(unknown)
|
||||
>a : Symbol(unknown)
|
||||
|
||||
var t08 = <a><i></i>#</a>;
|
||||
>t08 : Symbol(t08, Decl(jsxHash.tsx, 6, 3))
|
||||
>a : Symbol(unknown)
|
||||
>i : Symbol(unknown)
|
||||
>i : Symbol(unknown)
|
||||
>a : Symbol(unknown)
|
||||
|
||||
var t09 = <a>#<i></i>#</a>;
|
||||
>t09 : Symbol(t09, Decl(jsxHash.tsx, 7, 3))
|
||||
>a : Symbol(unknown)
|
||||
>i : Symbol(unknown)
|
||||
>i : Symbol(unknown)
|
||||
>a : Symbol(unknown)
|
||||
|
||||
var t10 = <a><i/>#</a>;
|
||||
>t10 : Symbol(t10, Decl(jsxHash.tsx, 8, 3))
|
||||
>a : Symbol(unknown)
|
||||
>i : Symbol(unknown)
|
||||
>a : Symbol(unknown)
|
||||
|
||||
var t11 = <a>#<i/></a>;
|
||||
>t11 : Symbol(t11, Decl(jsxHash.tsx, 9, 3))
|
||||
>a : Symbol(unknown)
|
||||
>i : Symbol(unknown)
|
||||
>a : Symbol(unknown)
|
||||
|
||||
var t12 = <a>#</a>;
|
||||
>t12 : Symbol(t12, Decl(jsxHash.tsx, 10, 3))
|
||||
>a : Symbol(unknown)
|
||||
>a : Symbol(unknown)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ let x = Test; // emit test_1.default
|
||||
>Test : Symbol(Test, Decl(consumer.tsx, 1, 6))
|
||||
|
||||
<anything attr={Test} />; // ?
|
||||
>anything : Symbol(unknown)
|
||||
>attr : Symbol(unknown)
|
||||
>Test : Symbol(Test, Decl(consumer.tsx, 1, 6))
|
||||
|
||||
|
||||
@@ -37,21 +37,36 @@ declare var hasOwnProperty:any;
|
||||
>hasOwnProperty : Symbol(hasOwnProperty, Decl(jsxReactTestSuite.tsx, 12, 11))
|
||||
|
||||
<div>text</div>;
|
||||
>div : Symbol(unknown)
|
||||
>div : Symbol(unknown)
|
||||
|
||||
<div>
|
||||
>div : Symbol(unknown)
|
||||
|
||||
{this.props.children}
|
||||
</div>;
|
||||
>div : Symbol(unknown)
|
||||
|
||||
<div>
|
||||
>div : Symbol(unknown)
|
||||
|
||||
<div><br /></div>
|
||||
>div : Symbol(unknown)
|
||||
>br : Symbol(unknown)
|
||||
>div : Symbol(unknown)
|
||||
|
||||
<Component>{foo}<br />{bar}</Component>
|
||||
>Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11))
|
||||
>foo : Symbol(foo, Decl(jsxReactTestSuite.tsx, 7, 11))
|
||||
>br : Symbol(unknown)
|
||||
>bar : Symbol(bar, Decl(jsxReactTestSuite.tsx, 8, 11))
|
||||
>Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11))
|
||||
|
||||
<br />
|
||||
>br : Symbol(unknown)
|
||||
|
||||
</div>;
|
||||
>div : Symbol(unknown)
|
||||
|
||||
|
||||
<Composite>
|
||||
@@ -74,6 +89,8 @@ var x =
|
||||
>x : Symbol(x, Decl(jsxReactTestSuite.tsx, 10, 11), Decl(jsxReactTestSuite.tsx, 35, 3))
|
||||
|
||||
<div
|
||||
>div : Symbol(unknown)
|
||||
|
||||
attr1={
|
||||
>attr1 : Symbol(unknown)
|
||||
|
||||
@@ -97,41 +114,64 @@ var x =
|
||||
>attr4 : Symbol(unknown)
|
||||
|
||||
</div>;
|
||||
>div : Symbol(unknown)
|
||||
|
||||
(
|
||||
<div>
|
||||
>div : Symbol(unknown)
|
||||
|
||||
{/* A comment at the beginning */}
|
||||
{/* A second comment at the beginning */}
|
||||
<span>
|
||||
>span : Symbol(unknown)
|
||||
|
||||
{/* A nested comment */}
|
||||
</span>
|
||||
>span : Symbol(unknown)
|
||||
|
||||
{/* A sandwiched comment */}
|
||||
<br />
|
||||
>br : Symbol(unknown)
|
||||
|
||||
{/* A comment at the end */}
|
||||
{/* A second comment at the end */}
|
||||
</div>
|
||||
>div : Symbol(unknown)
|
||||
|
||||
);
|
||||
|
||||
(
|
||||
<div
|
||||
>div : Symbol(unknown)
|
||||
|
||||
/* a multi-line
|
||||
comment */
|
||||
attr1="foo">
|
||||
>attr1 : Symbol(unknown)
|
||||
|
||||
<span // a double-slash comment
|
||||
>span : Symbol(unknown)
|
||||
|
||||
attr2="bar"
|
||||
>attr2 : Symbol(unknown)
|
||||
|
||||
/>
|
||||
</div>
|
||||
>div : Symbol(unknown)
|
||||
|
||||
);
|
||||
|
||||
<div> </div>;
|
||||
>div : Symbol(unknown)
|
||||
>div : Symbol(unknown)
|
||||
|
||||
<div> </div>;
|
||||
>div : Symbol(unknown)
|
||||
>div : Symbol(unknown)
|
||||
|
||||
<hasOwnProperty>testing</hasOwnProperty>;
|
||||
>hasOwnProperty : Symbol(unknown)
|
||||
>hasOwnProperty : Symbol(unknown)
|
||||
|
||||
<Component constructor="foo" />;
|
||||
>Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11))
|
||||
@@ -158,6 +198,7 @@ var x =
|
||||
>sound : Symbol(unknown)
|
||||
|
||||
<font-face />;
|
||||
>font-face : Symbol(unknown)
|
||||
|
||||
<Component x={y} />;
|
||||
>Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11))
|
||||
@@ -165,6 +206,7 @@ var x =
|
||||
>y : Symbol(y, Decl(jsxReactTestSuite.tsx, 9, 11))
|
||||
|
||||
<x-component />;
|
||||
>x-component : Symbol(unknown)
|
||||
|
||||
<Component {...x} />;
|
||||
>Component : Symbol(Component, Decl(jsxReactTestSuite.tsx, 2, 11))
|
||||
|
||||
@@ -4,14 +4,18 @@ declare var React: any;
|
||||
>React : Symbol(React, Decl(keywordInJsxIdentifier.tsx, 1, 11))
|
||||
|
||||
<foo class-id/>;
|
||||
>foo : Symbol(unknown)
|
||||
>class-id : Symbol(unknown)
|
||||
|
||||
<foo class/>;
|
||||
>foo : Symbol(unknown)
|
||||
>class : Symbol(unknown)
|
||||
|
||||
<foo class-id="1"/>;
|
||||
>foo : Symbol(unknown)
|
||||
>class-id : Symbol(unknown)
|
||||
|
||||
<foo class="1"/>;
|
||||
>foo : Symbol(unknown)
|
||||
>class : Symbol(unknown)
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ let l9 = 0, l10 :string = "", l11 = null;
|
||||
>null : null
|
||||
|
||||
for(let l11 in {}) { }
|
||||
>l11 : any
|
||||
>l11 : string
|
||||
>{} : {}
|
||||
|
||||
for(let l12 = 0; l12 < 9; l12++) { }
|
||||
|
||||
@@ -29,7 +29,7 @@ let l9 = 0, l10 :string = "", l11 = null;
|
||||
>null : null
|
||||
|
||||
for(let l11 in {}) { }
|
||||
>l11 : any
|
||||
>l11 : string
|
||||
>{} : {}
|
||||
|
||||
for(let l12 = 0; l12 < 9; l12++) { }
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
// should not be an error
|
||||
for (var let in [1,2,3]) {}
|
||||
>let : any
|
||||
>let : string
|
||||
>[1,2,3] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
@@ -10,7 +10,7 @@ for (var let in [1,2,3]) {}
|
||||
|
||||
{
|
||||
for (var let in [1,2,3]) {}
|
||||
>let : any
|
||||
>let : string
|
||||
>[1,2,3] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
// should not be an error
|
||||
for (var let in [1,2,3]) {}
|
||||
>let : any
|
||||
>let : string
|
||||
>[1,2,3] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
@@ -10,7 +10,7 @@ for (var let in [1,2,3]) {}
|
||||
|
||||
{
|
||||
for (var let in [1,2,3]) {}
|
||||
>let : any
|
||||
>let : string
|
||||
>[1,2,3] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/compiler/noImplicitAnyIndexing.ts(13,26): error TS7017: Index signature of object type implicitly has an 'any' type.
|
||||
tests/cases/compiler/noImplicitAnyIndexing.ts(13,26): error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'.
|
||||
tests/cases/compiler/noImplicitAnyIndexing.ts(20,9): error TS7017: Index signature of object type implicitly has an 'any' type.
|
||||
tests/cases/compiler/noImplicitAnyIndexing.ts(23,9): error TS7017: Index signature of object type implicitly has an 'any' type.
|
||||
tests/cases/compiler/noImplicitAnyIndexing.ts(31,10): error TS7017: Index signature of object type implicitly has an 'any' type.
|
||||
@@ -19,7 +19,7 @@ tests/cases/compiler/noImplicitAnyIndexing.ts(31,10): error TS7017: Index signat
|
||||
// Should be implicit 'any' ; property access fails, no string indexer.
|
||||
var strRepresentation3 = MyEmusEnum["monehh"];
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS7017: Index signature of object type implicitly has an 'any' type.
|
||||
!!! error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'.
|
||||
|
||||
// Should be okay; should be a MyEmusEnum
|
||||
var strRepresentation4 = MyEmusEnum["emu"];
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement19.ts(1,16): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement19.ts (1 errors) ====
|
||||
for (var of in of) { }
|
||||
~~
|
||||
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
@@ -1,5 +0,0 @@
|
||||
=== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement19.ts ===
|
||||
for (var of in of) { }
|
||||
>of : Symbol(of, Decl(parserES5ForOfStatement19.ts, 0, 8))
|
||||
>of : Symbol(of, Decl(parserES5ForOfStatement19.ts, 0, 8))
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
=== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement19.ts ===
|
||||
for (var of in of) { }
|
||||
>of : any
|
||||
>of : any
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement20.ts(1,10): error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement20.ts(1,20): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement20.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement20.ts (2 errors) ====
|
||||
for (var of = 0 in of) { }
|
||||
~~
|
||||
!!! error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
|
||||
!!! error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
|
||||
~~
|
||||
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
@@ -0,0 +1,7 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement19.ts(1,16): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement19.ts (1 errors) ====
|
||||
for (var of in of) { }
|
||||
~~
|
||||
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
@@ -1,5 +0,0 @@
|
||||
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement19.ts ===
|
||||
for (var of in of) { }
|
||||
>of : Symbol(of, Decl(parserForOfStatement19.ts, 0, 8))
|
||||
>of : Symbol(of, Decl(parserForOfStatement19.ts, 0, 8))
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
=== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement19.ts ===
|
||||
for (var of in of) { }
|
||||
>of : any
|
||||
>of : any
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement20.ts(1,10): error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
|
||||
tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement20.ts(1,20): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement20.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript6/Iterators/parserForOfStatement20.ts (2 errors) ====
|
||||
for (var of = 0 in of) { }
|
||||
~~
|
||||
!!! error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
|
||||
!!! error TS1189: The variable declaration of a 'for...in' statement cannot have an initializer.
|
||||
~~
|
||||
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
@@ -16,5 +16,6 @@ declare var foo: any;
|
||||
>foo : Symbol(foo, Decl(test.tsx, 1, 11))
|
||||
|
||||
<foo data/>;
|
||||
>foo : Symbol(unknown)
|
||||
>data : Symbol(unknown)
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ declare var x: any;
|
||||
>x : Symbol(x, Decl(reactNamespaceJSXEmit.tsx, 4, 11))
|
||||
|
||||
<foo data/>;
|
||||
>foo : Symbol(unknown)
|
||||
>data : Symbol(unknown)
|
||||
|
||||
<Bar x={x} />;
|
||||
@@ -21,6 +22,8 @@ declare var x: any;
|
||||
>x : Symbol(x, Decl(reactNamespaceJSXEmit.tsx, 4, 11))
|
||||
|
||||
<x-component />;
|
||||
>x-component : Symbol(unknown)
|
||||
|
||||
<Bar {...x} />;
|
||||
>Bar : Symbol(Bar, Decl(reactNamespaceJSXEmit.tsx, 3, 11))
|
||||
>x : Symbol(x, Decl(reactNamespaceJSXEmit.tsx, 4, 11))
|
||||
|
||||
@@ -5,13 +5,14 @@ tests/cases/compiler/recursiveLetConst.ts(5,14): error TS2448: Block-scoped vari
|
||||
tests/cases/compiler/recursiveLetConst.ts(6,14): error TS2448: Block-scoped variable 'v' used before its declaration.
|
||||
tests/cases/compiler/recursiveLetConst.ts(7,1): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/recursiveLetConst.ts(7,16): error TS2448: Block-scoped variable 'v' used before its declaration.
|
||||
tests/cases/compiler/recursiveLetConst.ts(8,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
tests/cases/compiler/recursiveLetConst.ts(8,15): error TS2448: Block-scoped variable 'v' used before its declaration.
|
||||
tests/cases/compiler/recursiveLetConst.ts(9,15): error TS2448: Block-scoped variable 'v' used before its declaration.
|
||||
tests/cases/compiler/recursiveLetConst.ts(10,17): error TS2448: Block-scoped variable 'v' used before its declaration.
|
||||
tests/cases/compiler/recursiveLetConst.ts(11,11): error TS2448: Block-scoped variable 'x2' used before its declaration.
|
||||
|
||||
|
||||
==== tests/cases/compiler/recursiveLetConst.ts (11 errors) ====
|
||||
==== tests/cases/compiler/recursiveLetConst.ts (12 errors) ====
|
||||
'use strict'
|
||||
let x = x + 1;
|
||||
~
|
||||
@@ -35,6 +36,8 @@ tests/cases/compiler/recursiveLetConst.ts(11,11): error TS2448: Block-scoped var
|
||||
!!! error TS2448: Block-scoped variable 'v' used before its declaration.
|
||||
for (let v in v) { }
|
||||
~
|
||||
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
~
|
||||
!!! error TS2448: Block-scoped variable 'v' used before its declaration.
|
||||
for (let v of v) { }
|
||||
~
|
||||
|
||||
@@ -51,9 +51,9 @@ for (var i = 0; ;) { throw i; }
|
||||
>i : number
|
||||
|
||||
for (var idx in {}) { throw idx; }
|
||||
>idx : any
|
||||
>idx : string
|
||||
>{} : {}
|
||||
>idx : any
|
||||
>idx : string
|
||||
|
||||
do { throw null; }while(true)
|
||||
>null : null
|
||||
|
||||
@@ -22,5 +22,6 @@ var obj1: Obj1;
|
||||
>Obj1 : Symbol(Obj1, Decl(file.tsx, 3, 1))
|
||||
|
||||
<obj1 x={10} />; // Error
|
||||
>obj1 : Symbol(unknown)
|
||||
>x : Symbol(unknown)
|
||||
|
||||
|
||||
@@ -17,5 +17,6 @@ var obj1: Obj1;
|
||||
>Obj1 : Symbol(Obj1, Decl(file.tsx, 2, 1))
|
||||
|
||||
<obj1 x={10} />; // OK
|
||||
>obj1 : Symbol(unknown)
|
||||
>x : Symbol(unknown)
|
||||
|
||||
|
||||
@@ -8,5 +8,6 @@ declare module JSX {
|
||||
|
||||
// OK, but implicit any
|
||||
<div n='x' />;
|
||||
>div : Symbol(unknown)
|
||||
>n : Symbol(unknown)
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ export class Button extends React.Component<any, any> {
|
||||
>render : Symbol(render, Decl(button.tsx, 2, 55))
|
||||
|
||||
return <button>Some button</button>;
|
||||
>button : Symbol(unknown)
|
||||
>button : Symbol(unknown)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
=== tests/cases/conformance/jsx/tsxNoJsx.tsx ===
|
||||
|
||||
No type information for this code.<nope />;
|
||||
No type information for this code.
|
||||
No type information for this code.
|
||||
<nope />;
|
||||
>nope : Symbol(unknown)
|
||||
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
// A built-in element (OK)
|
||||
var a1 = <div id="foo" />;
|
||||
>a1 : Symbol(a1, Decl(tsxTypeErrors.tsx, 2, 3))
|
||||
>div : Symbol(unknown)
|
||||
>id : Symbol(unknown)
|
||||
|
||||
// A built-in element with a mistyped property (error)
|
||||
var a2 = <img srce="foo.jpg" />
|
||||
>a2 : Symbol(a2, Decl(tsxTypeErrors.tsx, 5, 3))
|
||||
>img : Symbol(unknown)
|
||||
>srce : Symbol(unknown)
|
||||
|
||||
// A built-in element with a badly-typed attribute value (error)
|
||||
@@ -17,12 +19,14 @@ var thing = { oops: 100 };
|
||||
|
||||
var a3 = <div id={thing} />
|
||||
>a3 : Symbol(a3, Decl(tsxTypeErrors.tsx, 9, 3))
|
||||
>div : Symbol(unknown)
|
||||
>id : Symbol(unknown)
|
||||
>thing : Symbol(thing, Decl(tsxTypeErrors.tsx, 8, 3))
|
||||
|
||||
// Mistyped html name (error)
|
||||
var e1 = <imag src="bar.jpg" />
|
||||
>e1 : Symbol(e1, Decl(tsxTypeErrors.tsx, 12, 3))
|
||||
>imag : Symbol(unknown)
|
||||
>src : Symbol(unknown)
|
||||
|
||||
// A custom type
|
||||
|
||||
@@ -19,7 +19,7 @@ function foo00(x) {
|
||||
var v = x;
|
||||
(function() { return x + v });
|
||||
(() => x + v);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -158,7 +158,7 @@ function foo00_c(x) {
|
||||
var v = x;
|
||||
(function() { return x + v });
|
||||
(() => x + v);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ function foo00(x) {
|
||||
var v = x;
|
||||
(function() { return x + v });
|
||||
(() => x + v);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -160,7 +160,7 @@ function foo00_c(x) {
|
||||
var v = x;
|
||||
(function() { return x + v });
|
||||
(() => x + v);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@ for (let x of []) {
|
||||
for (let x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -132,10 +132,10 @@ for (const x of []) {
|
||||
for (const x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,10 +14,10 @@ for (let x of []) {
|
||||
for (let x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -133,10 +133,10 @@ for (const x of []) {
|
||||
for (const x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,16 +21,16 @@ l00:
|
||||
for (let x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break l00;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue l00;
|
||||
}
|
||||
}
|
||||
@@ -209,16 +209,16 @@ l00_c:
|
||||
for (const x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break l00_c;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue l00_c;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,16 +22,16 @@ l00:
|
||||
for (let x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break l00;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue l00;
|
||||
}
|
||||
}
|
||||
@@ -210,16 +210,16 @@ l00_c:
|
||||
for (const x in []) {
|
||||
(function() { return x});
|
||||
(() => x);
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break;
|
||||
}
|
||||
if (x == 1) {
|
||||
if (x == "1") {
|
||||
break l00_c;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue;
|
||||
}
|
||||
if (x == 2) {
|
||||
if (x == "2") {
|
||||
continue l00_c;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
let a: Date[];
|
||||
let b: boolean[];
|
||||
|
||||
for (let x in a) {
|
||||
let a1 = a[x];
|
||||
let a2 = a[(x)];
|
||||
let a3 = a[+x];
|
||||
let b1 = b[x];
|
||||
let b2 = b[(x)];
|
||||
let b3 = b[+x];
|
||||
}
|
||||
|
||||
for (let x in a) {
|
||||
for (let y in a) {
|
||||
for (let z in a) {
|
||||
let a1 = a[x];
|
||||
let a2 = a[y];
|
||||
let a3 = a[z];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let i: string;
|
||||
let j: string;
|
||||
for (i in a) {
|
||||
for (j in b) {
|
||||
let a1 = a[i];
|
||||
let a2 = a[j];
|
||||
}
|
||||
}
|
||||
|
||||
var s: string;
|
||||
for (var s in a) {
|
||||
let a1 = a[s];
|
||||
}
|
||||
for (s in a) {
|
||||
let a1 = a[s];
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user