Migrate latest dom types into libdom.d.ts (#44684)

* Add the types_web dom dts

* Update

* Adds new DTS

* Update baselines
This commit is contained in:
Orta Therox
2021-06-25 14:25:30 -07:00
committed by GitHub
parent 8058619aed
commit 9ebe11c2d3
23 changed files with 2093 additions and 3013 deletions
+1952 -2920
View File
File diff suppressed because it is too large Load Diff
+34 -20
View File
@@ -1,5 +1,5 @@
/////////////////////////////
/// DOM Iterable APIs
/// Window Iterable APIs
/////////////////////////////
interface AudioParam {
@@ -30,10 +30,6 @@ interface CanvasPathDrawingStyles {
setLineDash(segments: Iterable<number>): void;
}
interface ClientRectList {
[Symbol.iterator](): IterableIterator<ClientRect>;
}
interface DOMRectList {
[Symbol.iterator](): IterableIterator<DOMRect>;
}
@@ -57,6 +53,9 @@ interface FileList {
[Symbol.iterator](): IterableIterator<File>;
}
interface FontFaceSet extends Set<FontFace> {
}
interface FormData {
[Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>;
/**
@@ -136,8 +135,13 @@ interface MediaList {
[Symbol.iterator](): IterableIterator<string>;
}
interface MessageEvent<T = any> {
/** @deprecated */
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
}
interface MimeTypeArray {
[Symbol.iterator](): IterableIterator<MimeType>;
[Symbol.iterator](): IterableIterator<any>;
}
interface NamedNodeMap {
@@ -146,6 +150,7 @@ interface NamedNodeMap {
interface Navigator {
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>;
vibrate(pattern: Iterable<number>): boolean;
}
interface NodeList {
@@ -181,20 +186,23 @@ interface NodeListOf<TNode extends Node> {
}
interface Plugin {
[Symbol.iterator](): IterableIterator<MimeType>;
[Symbol.iterator](): IterableIterator<undefined>;
}
interface PluginArray {
[Symbol.iterator](): IterableIterator<Plugin>;
}
interface RTCRtpTransceiver {
setCodecPreferences(codecs: Iterable<RTCRtpCodecCapability>): void;
[Symbol.iterator](): IterableIterator<any>;
}
interface RTCStatsReport extends ReadonlyMap<string, any> {
}
interface ReadableStream<R = any> {
[Symbol.iterator](): IterableIterator<any>;
entries(): IterableIterator<[number, any]>;
keys(): IterableIterator<number>;
values(): IterableIterator<any>;
}
interface SVGLengthList {
[Symbol.iterator](): IterableIterator<SVGLength>;
}
@@ -211,12 +219,12 @@ interface SVGStringList {
[Symbol.iterator](): IterableIterator<string>;
}
interface SourceBufferList {
[Symbol.iterator](): IterableIterator<SourceBuffer>;
interface SVGTransformList {
[Symbol.iterator](): IterableIterator<SVGTransform>;
}
interface SpeechGrammarList {
[Symbol.iterator](): IterableIterator<SpeechGrammar>;
interface SourceBufferList {
[Symbol.iterator](): IterableIterator<SourceBuffer>;
}
interface SpeechRecognitionResult {
@@ -231,6 +239,16 @@ interface StyleSheetList {
[Symbol.iterator](): IterableIterator<CSSStyleSheet>;
}
interface SubtleCrypto {
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
}
interface TextTrackCueList {
[Symbol.iterator](): IterableIterator<TextTrackCue>;
}
@@ -259,10 +277,6 @@ interface URLSearchParams {
values(): IterableIterator<string>;
}
interface VRDisplay {
requestPresent(layers: Iterable<VRLayer>): Promise<void>;
}
interface WEBGL_draw_buffers {
drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
}
@@ -5,9 +5,9 @@ var x: CustomEvent;
// valid since detail is any
x.initCustomEvent('hello', true, true, { id: 12, name: 'hello' });
>x.initCustomEvent('hello', true, true, { id: 12, name: 'hello' }) : void
>x.initCustomEvent : (typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any) => void
>x.initCustomEvent : (type: string, bubbles?: boolean, cancelable?: boolean, detail?: any) => void
>x : CustomEvent<any>
>initCustomEvent : (typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any) => void
>initCustomEvent : (type: string, bubbles?: boolean, cancelable?: boolean, detail?: any) => void
>'hello' : "hello"
>true : true
>true : true
@@ -1,6 +1,6 @@
=== tests/cases/compiler/elaboratedErrors.ts ===
interface FileSystem {
>FileSystem : Symbol(FileSystem, Decl(elaboratedErrors.ts, 0, 0))
>FileSystem : Symbol(FileSystem, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(elaboratedErrors.ts, 0, 0))
read: number;
>read : Symbol(FileSystem.read, Decl(elaboratedErrors.ts, 0, 22))
@@ -14,18 +14,18 @@ function fn(s: WorkerFS): void;
function fn(s: FileSystem): void;
>fn : Symbol(fn, Decl(elaboratedErrors.ts, 2, 1), Decl(elaboratedErrors.ts, 4, 31), Decl(elaboratedErrors.ts, 5, 33))
>s : Symbol(s, Decl(elaboratedErrors.ts, 5, 12))
>FileSystem : Symbol(FileSystem, Decl(elaboratedErrors.ts, 0, 0))
>FileSystem : Symbol(FileSystem, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(elaboratedErrors.ts, 0, 0))
function fn(s: FileSystem|WorkerFS) { }
>fn : Symbol(fn, Decl(elaboratedErrors.ts, 2, 1), Decl(elaboratedErrors.ts, 4, 31), Decl(elaboratedErrors.ts, 5, 33))
>s : Symbol(s, Decl(elaboratedErrors.ts, 6, 12))
>FileSystem : Symbol(FileSystem, Decl(elaboratedErrors.ts, 0, 0))
>FileSystem : Symbol(FileSystem, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(elaboratedErrors.ts, 0, 0))
>WorkerFS : Symbol(WorkerFS, Decl(elaboratedErrors.ts, 6, 39))
// This should issue a large error, not a small one
class WorkerFS implements FileSystem {
>WorkerFS : Symbol(WorkerFS, Decl(elaboratedErrors.ts, 6, 39))
>FileSystem : Symbol(FileSystem, Decl(elaboratedErrors.ts, 0, 0))
>FileSystem : Symbol(FileSystem, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --), Decl(elaboratedErrors.ts, 0, 0))
read: string;
>read : Symbol(WorkerFS.read, Decl(elaboratedErrors.ts, 9, 38))
File diff suppressed because one or more lines are too long
@@ -13,7 +13,7 @@
>new URL("../hamsters.jpg", import.meta.url).toString() : string
>new URL("../hamsters.jpg", import.meta.url).toString : () => string
>new URL("../hamsters.jpg", import.meta.url) : URL
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>"../hamsters.jpg" : "../hamsters.jpg"
>import.meta.url : string
>import.meta : ImportMeta
@@ -54,7 +54,7 @@
>src : string
>URL.createObjectURL(blob) : string
>URL.createObjectURL : (object: any) => string
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>createObjectURL : (object: any) => string
>blob : Blob
@@ -71,11 +71,11 @@
document.body.appendChild(image);
>document.body.appendChild(image) : HTMLImageElement
>document.body.appendChild : <T extends Node>(newChild: T) => T
>document.body.appendChild : <T extends Node>(node: T) => T
>document.body : HTMLElement
>document : Document
>body : HTMLElement
>appendChild : <T extends Node>(newChild: T) => T
>appendChild : <T extends Node>(node: T) => T
>image : HTMLImageElement
})();
@@ -13,7 +13,7 @@
>new URL("../hamsters.jpg", import.meta.url).toString() : string
>new URL("../hamsters.jpg", import.meta.url).toString : () => string
>new URL("../hamsters.jpg", import.meta.url) : URL
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>"../hamsters.jpg" : "../hamsters.jpg"
>import.meta.url : string
>import.meta : ImportMeta
@@ -54,7 +54,7 @@
>src : string
>URL.createObjectURL(blob) : string
>URL.createObjectURL : (object: any) => string
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>createObjectURL : (object: any) => string
>blob : Blob
@@ -71,11 +71,11 @@
document.body.appendChild(image);
>document.body.appendChild(image) : HTMLImageElement
>document.body.appendChild : <T extends Node>(newChild: T) => T
>document.body.appendChild : <T extends Node>(node: T) => T
>document.body : HTMLElement
>document : Document
>body : HTMLElement
>appendChild : <T extends Node>(newChild: T) => T
>appendChild : <T extends Node>(node: T) => T
>image : HTMLImageElement
})();
@@ -13,7 +13,7 @@
>new URL("../hamsters.jpg", import.meta.url).toString() : string
>new URL("../hamsters.jpg", import.meta.url).toString : () => string
>new URL("../hamsters.jpg", import.meta.url) : URL
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>"../hamsters.jpg" : "../hamsters.jpg"
>import.meta.url : string
>import.meta : ImportMeta
@@ -54,7 +54,7 @@
>src : string
>URL.createObjectURL(blob) : string
>URL.createObjectURL : (object: any) => string
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>createObjectURL : (object: any) => string
>blob : Blob
@@ -71,11 +71,11 @@
document.body.appendChild(image);
>document.body.appendChild(image) : HTMLImageElement
>document.body.appendChild : <T extends Node>(newChild: T) => T
>document.body.appendChild : <T extends Node>(node: T) => T
>document.body : HTMLElement
>document : Document
>body : HTMLElement
>appendChild : <T extends Node>(newChild: T) => T
>appendChild : <T extends Node>(node: T) => T
>image : HTMLImageElement
})();
@@ -13,7 +13,7 @@
>new URL("../hamsters.jpg", import.meta.url).toString() : string
>new URL("../hamsters.jpg", import.meta.url).toString : () => string
>new URL("../hamsters.jpg", import.meta.url) : URL
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>"../hamsters.jpg" : "../hamsters.jpg"
>import.meta.url : string
>import.meta : ImportMeta
@@ -54,7 +54,7 @@
>src : string
>URL.createObjectURL(blob) : string
>URL.createObjectURL : (object: any) => string
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>createObjectURL : (object: any) => string
>blob : Blob
@@ -71,11 +71,11 @@
document.body.appendChild(image);
>document.body.appendChild(image) : HTMLImageElement
>document.body.appendChild : <T extends Node>(newChild: T) => T
>document.body.appendChild : <T extends Node>(node: T) => T
>document.body : HTMLElement
>document : Document
>body : HTMLElement
>appendChild : <T extends Node>(newChild: T) => T
>appendChild : <T extends Node>(node: T) => T
>image : HTMLImageElement
})();
@@ -13,7 +13,7 @@
>new URL("../hamsters.jpg", import.meta.url).toString() : string
>new URL("../hamsters.jpg", import.meta.url).toString : () => string
>new URL("../hamsters.jpg", import.meta.url) : URL
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>"../hamsters.jpg" : "../hamsters.jpg"
>import.meta.url : string
>import.meta : ImportMeta
@@ -54,7 +54,7 @@
>src : string
>URL.createObjectURL(blob) : string
>URL.createObjectURL : (object: any) => string
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>createObjectURL : (object: any) => string
>blob : Blob
@@ -71,11 +71,11 @@
document.body.appendChild(image);
>document.body.appendChild(image) : HTMLImageElement
>document.body.appendChild : <T extends Node>(newChild: T) => T
>document.body.appendChild : <T extends Node>(node: T) => T
>document.body : HTMLElement
>document : Document
>body : HTMLElement
>appendChild : <T extends Node>(newChild: T) => T
>appendChild : <T extends Node>(node: T) => T
>image : HTMLImageElement
})();
@@ -13,7 +13,7 @@
>new URL("../hamsters.jpg", import.meta.url).toString() : string
>new URL("../hamsters.jpg", import.meta.url).toString : () => string
>new URL("../hamsters.jpg", import.meta.url) : URL
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>"../hamsters.jpg" : "../hamsters.jpg"
>import.meta.url : string
>import.meta : ImportMeta
@@ -54,7 +54,7 @@
>src : string
>URL.createObjectURL(blob) : string
>URL.createObjectURL : (object: any) => string
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>createObjectURL : (object: any) => string
>blob : Blob
@@ -71,11 +71,11 @@
document.body.appendChild(image);
>document.body.appendChild(image) : HTMLImageElement
>document.body.appendChild : <T extends Node>(newChild: T) => T
>document.body.appendChild : <T extends Node>(node: T) => T
>document.body : HTMLElement
>document : Document
>body : HTMLElement
>appendChild : <T extends Node>(newChild: T) => T
>appendChild : <T extends Node>(node: T) => T
>image : HTMLImageElement
})();
@@ -13,7 +13,7 @@
>new URL("../hamsters.jpg", import.meta.url).toString() : string
>new URL("../hamsters.jpg", import.meta.url).toString : () => string
>new URL("../hamsters.jpg", import.meta.url) : URL
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>"../hamsters.jpg" : "../hamsters.jpg"
>import.meta.url : string
>import.meta : ImportMeta
@@ -54,7 +54,7 @@
>src : string
>URL.createObjectURL(blob) : string
>URL.createObjectURL : (object: any) => string
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>createObjectURL : (object: any) => string
>blob : Blob
@@ -71,11 +71,11 @@
document.body.appendChild(image);
>document.body.appendChild(image) : HTMLImageElement
>document.body.appendChild : <T extends Node>(newChild: T) => T
>document.body.appendChild : <T extends Node>(node: T) => T
>document.body : HTMLElement
>document : Document
>body : HTMLElement
>appendChild : <T extends Node>(newChild: T) => T
>appendChild : <T extends Node>(node: T) => T
>image : HTMLImageElement
})();
@@ -13,7 +13,7 @@
>new URL("../hamsters.jpg", import.meta.url).toString() : string
>new URL("../hamsters.jpg", import.meta.url).toString : () => string
>new URL("../hamsters.jpg", import.meta.url) : URL
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>"../hamsters.jpg" : "../hamsters.jpg"
>import.meta.url : string
>import.meta : ImportMeta
@@ -54,7 +54,7 @@
>src : string
>URL.createObjectURL(blob) : string
>URL.createObjectURL : (object: any) => string
>URL : { new (url: string, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>URL : { new (url: string | URL, base?: string | URL): URL; prototype: URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }
>createObjectURL : (object: any) => string
>blob : Blob
@@ -71,11 +71,11 @@
document.body.appendChild(image);
>document.body.appendChild(image) : HTMLImageElement
>document.body.appendChild : <T extends Node>(newChild: T) => T
>document.body.appendChild : <T extends Node>(node: T) => T
>document.body : HTMLElement
>document : Document
>body : HTMLElement
>appendChild : <T extends Node>(newChild: T) => T
>appendChild : <T extends Node>(node: T) => T
>image : HTMLImageElement
})();
@@ -24,7 +24,7 @@ export function assertIsElement(node: Node | null): node is Element {
}
export function assertNodeTagName<
>assertNodeTagName : <T extends "symbol" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap, U extends ElementTagNameMap[T]>(node: Node | null, tagName: T) => node is U
>assertNodeTagName : <T extends "symbol" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap, U extends ElementTagNameMap[T]>(node: Node | null, tagName: T) => node is U
T extends keyof ElementTagNameMap,
U extends ElementTagNameMap[T]>(node: Node | null, tagName: T): node is U {
@@ -56,7 +56,7 @@ export function assertNodeTagName<
}
export function assertNodeProperty<
>assertNodeProperty : <T extends "symbol" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap, P extends keyof ElementTagNameMap[T], V extends HTMLElementTagNameMap[T][P]>(node: Node | null, tagName: T, prop: P, value: V) => void
>assertNodeProperty : <T extends "symbol" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap, P extends keyof ElementTagNameMap[T], V extends HTMLElementTagNameMap[T][P]>(node: Node | null, tagName: T, prop: P, value: V) => void
T extends keyof ElementTagNameMap,
P extends keyof ElementTagNameMap[T],
@@ -69,7 +69,7 @@ export function assertNodeProperty<
if (assertNodeTagName(node, tagName)) {
>assertNodeTagName(node, tagName) : boolean
>assertNodeTagName : <T extends "symbol" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap, U extends ElementTagNameMap[T]>(node: Node | null, tagName: T) => node is U
>assertNodeTagName : <T extends "symbol" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap, U extends ElementTagNameMap[T]>(node: Node | null, tagName: T) => node is U
>node : Node | null
>tagName : T
@@ -10,7 +10,7 @@ tests/cases/compiler/intersectionsOfLargeUnions2.ts(31,15): error TS2536: Type '
interface ElementTagNameMap {
~~~~~~~~~~~~~~~~~
!!! error TS2300: Duplicate identifier 'ElementTagNameMap'.
!!! related TS6203 /.ts/lib.dom.d.ts:19225:6: 'ElementTagNameMap' was also declared here.
!!! related TS6203 /.ts/lib.dom.d.ts:18221:6: 'ElementTagNameMap' was also declared here.
[index: number]: HTMLElement
}
@@ -38,7 +38,7 @@ export function assertIsElement(node: Node | null): node is Element {
}
export function assertNodeTagName<
>assertNodeTagName : <T extends "symbol" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap, U extends ElementTagNameMap[T]>(node: Node | null, tagName: T) => node is U
>assertNodeTagName : <T extends "symbol" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap, U extends ElementTagNameMap[T]>(node: Node | null, tagName: T) => node is U
T extends keyof ElementTagNameMap,
U extends ElementTagNameMap[T]>(node: Node | null, tagName: T): node is U {
@@ -70,7 +70,7 @@ export function assertNodeTagName<
}
export function assertNodeProperty<
>assertNodeProperty : <T extends "symbol" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap, P extends keyof ElementTagNameMap[T], V extends HTMLElementTagNameMap[T][P]>(node: Node | null, tagName: T, prop: P, value: V) => void
>assertNodeProperty : <T extends "symbol" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap, P extends keyof ElementTagNameMap[T], V extends HTMLElementTagNameMap[T][P]>(node: Node | null, tagName: T, prop: P, value: V) => void
T extends keyof ElementTagNameMap,
P extends keyof ElementTagNameMap[T],
@@ -83,7 +83,7 @@ export function assertNodeProperty<
if (assertNodeTagName(node, tagName)) {
>assertNodeTagName(node, tagName) : boolean
>assertNodeTagName : <T extends "symbol" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap, U extends ElementTagNameMap[T]>(node: Node | null, tagName: T) => node is U
>assertNodeTagName : <T extends "symbol" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap, U extends ElementTagNameMap[T]>(node: Node | null, tagName: T) => node is U
>node : Node | null
>tagName : T
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -86,8 +86,8 @@ tests/cases/compiler/truthinessCallExpressionCoercion2.ts(112,14): error TS2774:
function checksConsole() {
// error
typeof window !== 'undefined' && window.console &&
((window.console as any).firebug || (window.console.exception && window.console.table));
~~~~~~~~~~~~~~~~~~~~~~~~
((window.console as any).firebug || (window.console.error && window.console.table));
~~~~~~~~~~~~~~~~~~~~
!!! error TS2774: This condition will always return true since this function is always defined. Did you mean to call it instead?
}
@@ -63,7 +63,7 @@ function test(required1: () => boolean, required2: () => boolean, b: boolean, op
function checksConsole() {
// error
typeof window !== 'undefined' && window.console &&
((window.console as any).firebug || (window.console.exception && window.console.table));
((window.console as any).firebug || (window.console.error && window.console.table));
}
function checksPropertyAccess() {
@@ -166,7 +166,7 @@ function test(required1, required2, b, optional) {
function checksConsole() {
// error
typeof window !== 'undefined' && window.console &&
(window.console.firebug || (window.console.exception && window.console.table));
(window.console.firebug || (window.console.error && window.console.table));
}
function checksPropertyAccess() {
var x = {
@@ -140,15 +140,15 @@ function checksConsole() {
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
((window.console as any).firebug || (window.console.exception && window.console.table));
((window.console as any).firebug || (window.console.error && window.console.table));
>window.console : Symbol(console, Decl(lib.dom.d.ts, --, --))
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
>window.console.exception : Symbol(Console.exception, Decl(lib.dom.d.ts, --, --))
>window.console.error : Symbol(Console.error, Decl(lib.dom.d.ts, --, --))
>window.console : Symbol(console, Decl(lib.dom.d.ts, --, --))
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
>exception : Symbol(Console.exception, Decl(lib.dom.d.ts, --, --))
>error : Symbol(Console.error, Decl(lib.dom.d.ts, --, --))
>window.console.table : Symbol(Console.table, Decl(lib.dom.d.ts, --, --))
>window.console : Symbol(console, Decl(lib.dom.d.ts, --, --))
>window : Symbol(window, Decl(lib.dom.d.ts, --, --))
@@ -129,7 +129,7 @@ function test(required1: () => boolean, required2: () => boolean, b: boolean, op
>f.apply : (this: Function, thisArg: any, argArray?: any) => any
>f : () => void
>apply : (this: Function, thisArg: any, argArray?: any) => any
>parent : Window
>parent : Window | null
>[] : never[]
// error
@@ -193,7 +193,7 @@ function checksConsole() {
// error
typeof window !== 'undefined' && window.console &&
>typeof window !== 'undefined' && window.console && ((window.console as any).firebug || (window.console.exception && window.console.table)) : any
>typeof window !== 'undefined' && window.console && ((window.console as any).firebug || (window.console.error && window.console.table)) : any
>typeof window !== 'undefined' && window.console : false | Console
>typeof window !== 'undefined' : boolean
>typeof window : "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"
@@ -203,9 +203,9 @@ function checksConsole() {
>window : Window & typeof globalThis
>console : Console
((window.console as any).firebug || (window.console.exception && window.console.table));
>((window.console as any).firebug || (window.console.exception && window.console.table)) : any
>(window.console as any).firebug || (window.console.exception && window.console.table) : any
((window.console as any).firebug || (window.console.error && window.console.table));
>((window.console as any).firebug || (window.console.error && window.console.table)) : any
>(window.console as any).firebug || (window.console.error && window.console.table) : any
>(window.console as any).firebug : any
>(window.console as any) : any
>window.console as any : any
@@ -213,13 +213,13 @@ function checksConsole() {
>window : Window & typeof globalThis
>console : Console
>firebug : any
>(window.console.exception && window.console.table) : (tabularData?: any, properties?: string[] | undefined) => void
>window.console.exception && window.console.table : (tabularData?: any, properties?: string[] | undefined) => void
>window.console.exception : (message?: string | undefined, ...optionalParams: any[]) => void
>(window.console.error && window.console.table) : (tabularData?: any, properties?: string[] | undefined) => void
>window.console.error && window.console.table : (tabularData?: any, properties?: string[] | undefined) => void
>window.console.error : (...data: any[]) => void
>window.console : Console
>window : Window & typeof globalThis
>console : Console
>exception : (message?: string | undefined, ...optionalParams: any[]) => void
>error : (...data: any[]) => void
>window.console.table : (tabularData?: any, properties?: string[] | undefined) => void
>window.console : Console
>window : Window & typeof globalThis
@@ -65,7 +65,7 @@ function test(required1: () => boolean, required2: () => boolean, b: boolean, op
function checksConsole() {
// error
typeof window !== 'undefined' && window.console &&
((window.console as any).firebug || (window.console.exception && window.console.table));
((window.console as any).firebug || (window.console.error && window.console.table));
}
function checksPropertyAccess() {