mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Migrate over 4.4 lib dom and webworker (#45324)
* Brings across 4.4 DOM + Web Worker changes * Adds tests * Incorporate #1092 and #1093 from TypeScript-DOM-lib-generator * update baselines Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
co-authored by
Nathan Shively-Sanders
parent
f80bc3f5f0
commit
b9e952be1d
Vendored
+339
-296
File diff suppressed because it is too large
Load Diff
Vendored
+4
-4
@@ -89,7 +89,7 @@ interface HTMLFormElement {
|
||||
}
|
||||
|
||||
interface HTMLSelectElement {
|
||||
[Symbol.iterator](): IterableIterator<Element>;
|
||||
[Symbol.iterator](): IterableIterator<HTMLOptionElement>;
|
||||
}
|
||||
|
||||
interface Headers {
|
||||
@@ -141,7 +141,7 @@ interface MessageEvent<T = any> {
|
||||
}
|
||||
|
||||
interface MimeTypeArray {
|
||||
[Symbol.iterator](): IterableIterator<any>;
|
||||
[Symbol.iterator](): IterableIterator<MimeType>;
|
||||
}
|
||||
|
||||
interface NamedNodeMap {
|
||||
@@ -186,11 +186,11 @@ interface NodeListOf<TNode extends Node> {
|
||||
}
|
||||
|
||||
interface Plugin {
|
||||
[Symbol.iterator](): IterableIterator<undefined>;
|
||||
[Symbol.iterator](): IterableIterator<MimeType>;
|
||||
}
|
||||
|
||||
interface PluginArray {
|
||||
[Symbol.iterator](): IterableIterator<any>;
|
||||
[Symbol.iterator](): IterableIterator<Plugin>;
|
||||
}
|
||||
|
||||
interface RTCStatsReport extends ReadonlyMap<string, any> {
|
||||
|
||||
Vendored
+767
-725
File diff suppressed because it is too large
Load Diff
+25
-4
@@ -6,10 +6,6 @@ interface Cache {
|
||||
addAll(requests: Iterable<RequestInfo>): Promise<void>;
|
||||
}
|
||||
|
||||
interface CanvasPathDrawingStyles {
|
||||
setLineDash(segments: Iterable<number>): void;
|
||||
}
|
||||
|
||||
interface DOMStringList {
|
||||
[Symbol.iterator](): IterableIterator<string>;
|
||||
}
|
||||
@@ -18,6 +14,9 @@ interface FileList {
|
||||
[Symbol.iterator](): IterableIterator<File>;
|
||||
}
|
||||
|
||||
interface FontFaceSet extends Set<FontFace> {
|
||||
}
|
||||
|
||||
interface FormData {
|
||||
[Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>;
|
||||
/**
|
||||
@@ -66,6 +65,28 @@ interface IDBObjectStore {
|
||||
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
|
||||
}
|
||||
|
||||
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 ReadableStream<R = any> {
|
||||
[Symbol.iterator](): IterableIterator<any>;
|
||||
entries(): IterableIterator<[number, any]>;
|
||||
keys(): IterableIterator<number>;
|
||||
values(): IterableIterator<any>;
|
||||
}
|
||||
|
||||
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 URLSearchParams {
|
||||
[Symbol.iterator](): IterableIterator<[string, string]>;
|
||||
/**
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -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:18221:6: 'ElementTagNameMap' was also declared here.
|
||||
!!! related TS6203 /.ts/lib.dom.d.ts:18258:6: 'ElementTagNameMap' was also declared here.
|
||||
[index: number]: HTMLElement
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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 | null
|
||||
>parent : Window
|
||||
>[] : never[]
|
||||
|
||||
// error
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This API is only in webworker
|
||||
importScripts("")
|
||||
>importScripts("") : void
|
||||
>importScripts : (...urls: string[]) => void
|
||||
>importScripts : (...urls: (string | URL)[]) => void
|
||||
>"" : ""
|
||||
|
||||
// This should not raise a compiler error
|
||||
|
||||
Reference in New Issue
Block a user