typescript 4.7.0-dev.20220405 → 4.7.0-dev.20220406
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.dom.d.ts +404 -31
- package/lib/lib.dom.iterable.d.ts +16 -3
- package/lib/lib.es2020.intl.d.ts +15 -13
- package/lib/lib.es2021.intl.d.ts +102 -0
- package/lib/lib.es5.d.ts +1 -1
- package/lib/lib.webworker.d.ts +110 -25
- package/lib/lib.webworker.iterable.d.ts +3 -3
- package/lib/protocol.d.ts +5 -2
- package/lib/tsc.js +436 -228
- package/lib/tsserver.js +677 -296
- package/lib/tsserverlibrary.d.ts +21 -13
- package/lib/tsserverlibrary.js +677 -296
- package/lib/typescript.d.ts +16 -11
- package/lib/typescript.js +673 -296
- package/lib/typescriptServices.d.ts +16 -11
- package/lib/typescriptServices.js +673 -296
- package/lib/typingsInstaller.js +581 -264
- package/package.json +1 -1
|
@@ -69,6 +69,9 @@ interface DataTransferItemList {
|
|
|
69
69
|
[Symbol.iterator](): IterableIterator<DataTransferItem>;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
interface EventCounts extends ReadonlyMap<string, number> {
|
|
73
|
+
}
|
|
74
|
+
|
|
72
75
|
interface FileList {
|
|
73
76
|
[Symbol.iterator](): IterableIterator<File>;
|
|
74
77
|
}
|
|
@@ -130,6 +133,16 @@ interface IDBObjectStore {
|
|
|
130
133
|
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
|
|
131
134
|
}
|
|
132
135
|
|
|
136
|
+
interface MIDIInputMap extends ReadonlyMap<string, MIDIInput> {
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
interface MIDIOutput {
|
|
140
|
+
send(data: Iterable<number>, timestamp?: DOMHighResTimeStamp): void;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
interface MIDIOutputMap extends ReadonlyMap<string, MIDIOutput> {
|
|
144
|
+
}
|
|
145
|
+
|
|
133
146
|
interface MediaKeyStatusMap {
|
|
134
147
|
[Symbol.iterator](): IterableIterator<[BufferSource, MediaKeyStatus]>;
|
|
135
148
|
entries(): IterableIterator<[BufferSource, MediaKeyStatus]>;
|
|
@@ -233,10 +246,10 @@ interface StyleSheetList {
|
|
|
233
246
|
|
|
234
247
|
interface SubtleCrypto {
|
|
235
248
|
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
236
|
-
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage
|
|
237
|
-
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage
|
|
249
|
+
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
|
|
250
|
+
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
238
251
|
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
|
|
239
|
-
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage
|
|
252
|
+
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
240
253
|
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
241
254
|
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>;
|
|
242
255
|
}
|
package/lib/lib.es2020.intl.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ declare namespace Intl {
|
|
|
83
83
|
*
|
|
84
84
|
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
|
|
85
85
|
*/
|
|
86
|
-
type LocalesArgument = UnicodeBCP47LocaleIdentifier |
|
|
86
|
+
type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined;
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* An object with some or all of properties of `options` parameter
|
|
@@ -315,30 +315,32 @@ declare namespace Intl {
|
|
|
315
315
|
| "code"
|
|
316
316
|
| "none";
|
|
317
317
|
|
|
318
|
-
type
|
|
318
|
+
type DisplayNamesType =
|
|
319
319
|
| "language"
|
|
320
320
|
| "region"
|
|
321
321
|
| "script"
|
|
322
|
+
| "calendar"
|
|
323
|
+
| "dateTimeField"
|
|
322
324
|
| "currency";
|
|
323
325
|
|
|
324
|
-
type
|
|
325
|
-
|
|
|
326
|
-
| "
|
|
327
|
-
| "datetimeField";
|
|
326
|
+
type DisplayNamesLanguageDisplay =
|
|
327
|
+
| "dialect"
|
|
328
|
+
| "standard";
|
|
328
329
|
|
|
329
330
|
interface DisplayNamesOptions {
|
|
330
|
-
localeMatcher
|
|
331
|
-
style
|
|
331
|
+
localeMatcher?: RelativeTimeFormatLocaleMatcher;
|
|
332
|
+
style?: RelativeTimeFormatStyle;
|
|
332
333
|
type: DisplayNamesType;
|
|
333
|
-
languageDisplay
|
|
334
|
-
fallback
|
|
334
|
+
languageDisplay?: DisplayNamesLanguageDisplay;
|
|
335
|
+
fallback?: DisplayNamesFallback;
|
|
335
336
|
}
|
|
336
337
|
|
|
337
338
|
interface ResolvedDisplayNamesOptions {
|
|
338
339
|
locale: UnicodeBCP47LocaleIdentifier;
|
|
339
340
|
style: RelativeTimeFormatStyle;
|
|
340
|
-
type:
|
|
341
|
+
type: DisplayNamesType;
|
|
341
342
|
fallback: DisplayNamesFallback;
|
|
343
|
+
languageDisplay?: DisplayNamesLanguageDisplay;
|
|
342
344
|
}
|
|
343
345
|
|
|
344
346
|
interface DisplayNames {
|
|
@@ -385,7 +387,7 @@ declare namespace Intl {
|
|
|
385
387
|
*
|
|
386
388
|
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames).
|
|
387
389
|
*/
|
|
388
|
-
new(locales
|
|
390
|
+
new(locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames;
|
|
389
391
|
|
|
390
392
|
/**
|
|
391
393
|
* Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale.
|
|
@@ -400,7 +402,7 @@ declare namespace Intl {
|
|
|
400
402
|
*
|
|
401
403
|
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf).
|
|
402
404
|
*/
|
|
403
|
-
supportedLocalesOf(locales
|
|
405
|
+
supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher }): BCP47LanguageTag[];
|
|
404
406
|
};
|
|
405
407
|
|
|
406
408
|
}
|
package/lib/lib.es2021.intl.d.ts
CHANGED
|
@@ -41,4 +41,106 @@ declare namespace Intl {
|
|
|
41
41
|
dayPeriod?: "narrow" | "short" | "long";
|
|
42
42
|
fractionalSecondDigits?: 0 | 1 | 2 | 3;
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The locale matching algorithm to use.
|
|
47
|
+
*
|
|
48
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
49
|
+
*/
|
|
50
|
+
type ListFormatLocaleMatcher = "lookup" | "best fit";
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The format of output message.
|
|
54
|
+
*
|
|
55
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
56
|
+
*/
|
|
57
|
+
type ListFormatType = "conjunction" | "disjunction" | "unit";
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The length of the formatted message.
|
|
61
|
+
*
|
|
62
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
63
|
+
*/
|
|
64
|
+
type ListFormatStyle = "long" | "short" | "narrow";
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter.
|
|
68
|
+
*
|
|
69
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
70
|
+
*/
|
|
71
|
+
interface ListFormatOptions {
|
|
72
|
+
/** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */
|
|
73
|
+
localeMatcher?: ListFormatLocaleMatcher | undefined;
|
|
74
|
+
/** The format of output message. */
|
|
75
|
+
type?: ListFormatType | undefined;
|
|
76
|
+
/** The length of the internationalized message. */
|
|
77
|
+
style?: ListFormatStyle | undefined;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface ListFormat {
|
|
81
|
+
/**
|
|
82
|
+
* Returns a string with a language-specific representation of the list.
|
|
83
|
+
*
|
|
84
|
+
* @param list - An iterable object, such as an [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array).
|
|
85
|
+
*
|
|
86
|
+
* @throws `TypeError` if `list` includes something other than the possible values.
|
|
87
|
+
*
|
|
88
|
+
* @returns {string} A language-specific formatted string representing the elements of the list.
|
|
89
|
+
*
|
|
90
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format).
|
|
91
|
+
*/
|
|
92
|
+
format(list: Iterable<string>): string;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion.
|
|
96
|
+
*
|
|
97
|
+
* @param list - An iterable object, such as an [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale.
|
|
98
|
+
*
|
|
99
|
+
* @throws `TypeError` if `list` includes something other than the possible values.
|
|
100
|
+
*
|
|
101
|
+
* @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list.
|
|
102
|
+
*
|
|
103
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts).
|
|
104
|
+
*/
|
|
105
|
+
formatToParts(list: Iterable<string>): { type: "element" | "literal", value: string; }[];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const ListFormat: {
|
|
109
|
+
prototype: ListFormat;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Creates [Intl.ListFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that
|
|
113
|
+
* enable language-sensitive list formatting.
|
|
114
|
+
*
|
|
115
|
+
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
116
|
+
* For the general form and interpretation of the `locales` argument,
|
|
117
|
+
* see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
118
|
+
*
|
|
119
|
+
* @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters)
|
|
120
|
+
* with some or all options of `ListFormatOptions`.
|
|
121
|
+
*
|
|
122
|
+
* @returns [Intl.ListFormatOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object.
|
|
123
|
+
*
|
|
124
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat).
|
|
125
|
+
*/
|
|
126
|
+
new(locales?: BCP47LanguageTag | BCP47LanguageTag[], options?: ListFormatOptions): ListFormat;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Returns an array containing those of the provided locales that are
|
|
130
|
+
* supported in list formatting without having to fall back to the runtime's default locale.
|
|
131
|
+
*
|
|
132
|
+
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
133
|
+
* For the general form and interpretation of the `locales` argument,
|
|
134
|
+
* see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
135
|
+
*
|
|
136
|
+
* @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters).
|
|
137
|
+
* with some or all possible options.
|
|
138
|
+
*
|
|
139
|
+
* @returns An array of strings representing a subset of the given locale tags that are supported in list
|
|
140
|
+
* formatting without having to fall back to the runtime's default locale.
|
|
141
|
+
*
|
|
142
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf).
|
|
143
|
+
*/
|
|
144
|
+
supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: Pick<ListFormatOptions, "localeMatcher">): BCP47LanguageTag[];
|
|
145
|
+
};
|
|
44
146
|
}
|
package/lib/lib.es5.d.ts
CHANGED
|
@@ -4424,7 +4424,7 @@ declare namespace Intl {
|
|
|
4424
4424
|
hour?: "numeric" | "2-digit" | undefined;
|
|
4425
4425
|
minute?: "numeric" | "2-digit" | undefined;
|
|
4426
4426
|
second?: "numeric" | "2-digit" | undefined;
|
|
4427
|
-
timeZoneName?: "long" | "
|
|
4427
|
+
timeZoneName?: "short" | "long" | "shortOffset" | "longOffset" | "shortGeneric" | "longGeneric" | undefined;
|
|
4428
4428
|
formatMatcher?: "best fit" | "basic" | undefined;
|
|
4429
4429
|
hour12?: boolean | undefined;
|
|
4430
4430
|
timeZone?: string | undefined;
|
package/lib/lib.webworker.d.ts
CHANGED
|
@@ -379,6 +379,11 @@ interface MultiCacheQueryOptions extends CacheQueryOptions {
|
|
|
379
379
|
cacheName?: string;
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
+
interface NavigationPreloadState {
|
|
383
|
+
enabled?: boolean;
|
|
384
|
+
headerValue?: string;
|
|
385
|
+
}
|
|
386
|
+
|
|
382
387
|
interface NotificationAction {
|
|
383
388
|
action: string;
|
|
384
389
|
icon?: string;
|
|
@@ -475,6 +480,22 @@ interface QueuingStrategyInit {
|
|
|
475
480
|
highWaterMark: number;
|
|
476
481
|
}
|
|
477
482
|
|
|
483
|
+
interface RTCEncodedAudioFrameMetadata {
|
|
484
|
+
contributingSources?: number[];
|
|
485
|
+
synchronizationSource?: number;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
interface RTCEncodedVideoFrameMetadata {
|
|
489
|
+
contributingSources?: number[];
|
|
490
|
+
dependencies?: number[];
|
|
491
|
+
frameId?: number;
|
|
492
|
+
height?: number;
|
|
493
|
+
spatialIndex?: number;
|
|
494
|
+
synchronizationSource?: number;
|
|
495
|
+
temporalIndex?: number;
|
|
496
|
+
width?: number;
|
|
497
|
+
}
|
|
498
|
+
|
|
478
499
|
interface ReadableStreamDefaultReadDoneResult {
|
|
479
500
|
done: true;
|
|
480
501
|
value?: undefined;
|
|
@@ -648,6 +669,13 @@ interface UnderlyingSource<R = any> {
|
|
|
648
669
|
type?: undefined;
|
|
649
670
|
}
|
|
650
671
|
|
|
672
|
+
interface VideoColorSpaceInit {
|
|
673
|
+
fullRange?: boolean;
|
|
674
|
+
matrix?: VideoMatrixCoefficients;
|
|
675
|
+
primaries?: VideoColorPrimaries;
|
|
676
|
+
transfer?: VideoTransferCharacteristics;
|
|
677
|
+
}
|
|
678
|
+
|
|
651
679
|
interface VideoConfiguration {
|
|
652
680
|
bitrate: number;
|
|
653
681
|
colorGamut?: ColorGamut;
|
|
@@ -695,7 +723,7 @@ interface AbortController {
|
|
|
695
723
|
/** Returns the AbortSignal object associated with this object. */
|
|
696
724
|
readonly signal: AbortSignal;
|
|
697
725
|
/** Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. */
|
|
698
|
-
abort(
|
|
726
|
+
// abort(): AbortSignal; - To be re-added in the future
|
|
699
727
|
}
|
|
700
728
|
|
|
701
729
|
declare var AbortController: {
|
|
@@ -712,6 +740,8 @@ interface AbortSignal extends EventTarget {
|
|
|
712
740
|
/** Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. */
|
|
713
741
|
readonly aborted: boolean;
|
|
714
742
|
onabort: ((this: AbortSignal, ev: Event) => any) | null;
|
|
743
|
+
readonly reason: any;
|
|
744
|
+
throwIfAborted(): void;
|
|
715
745
|
addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
716
746
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
717
747
|
removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
@@ -721,7 +751,7 @@ interface AbortSignal extends EventTarget {
|
|
|
721
751
|
declare var AbortSignal: {
|
|
722
752
|
prototype: AbortSignal;
|
|
723
753
|
new(): AbortSignal;
|
|
724
|
-
|
|
754
|
+
abort(reason?: any): AbortSignal;
|
|
725
755
|
};
|
|
726
756
|
|
|
727
757
|
interface AbstractWorkerEventMap {
|
|
@@ -747,7 +777,7 @@ interface Blob {
|
|
|
747
777
|
readonly type: string;
|
|
748
778
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
749
779
|
slice(start?: number, end?: number, contentType?: string): Blob;
|
|
750
|
-
stream(): ReadableStream
|
|
780
|
+
stream(): ReadableStream<Uint8Array>;
|
|
751
781
|
text(): Promise<string>;
|
|
752
782
|
}
|
|
753
783
|
|
|
@@ -807,13 +837,13 @@ declare var ByteLengthQueuingStrategy: {
|
|
|
807
837
|
* Available only in secure contexts.
|
|
808
838
|
*/
|
|
809
839
|
interface Cache {
|
|
810
|
-
add(request: RequestInfo): Promise<void>;
|
|
840
|
+
add(request: RequestInfo | URL): Promise<void>;
|
|
811
841
|
addAll(requests: RequestInfo[]): Promise<void>;
|
|
812
|
-
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
|
813
|
-
keys(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
|
|
814
|
-
match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>;
|
|
815
|
-
matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
|
|
816
|
-
put(request: RequestInfo, response: Response): Promise<void>;
|
|
842
|
+
delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<boolean>;
|
|
843
|
+
keys(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
|
|
844
|
+
match(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<Response | undefined>;
|
|
845
|
+
matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
|
|
846
|
+
put(request: RequestInfo | URL, response: Response): Promise<void>;
|
|
817
847
|
}
|
|
818
848
|
|
|
819
849
|
declare var Cache: {
|
|
@@ -829,7 +859,7 @@ interface CacheStorage {
|
|
|
829
859
|
delete(cacheName: string): Promise<boolean>;
|
|
830
860
|
has(cacheName: string): Promise<boolean>;
|
|
831
861
|
keys(): Promise<string[]>;
|
|
832
|
-
match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
|
|
862
|
+
match(request: RequestInfo | URL, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
|
|
833
863
|
open(cacheName: string): Promise<Cache>;
|
|
834
864
|
}
|
|
835
865
|
|
|
@@ -1462,6 +1492,7 @@ declare var ExtendableMessageEvent: {
|
|
|
1462
1492
|
interface FetchEvent extends ExtendableEvent {
|
|
1463
1493
|
readonly clientId: string;
|
|
1464
1494
|
readonly handled: Promise<undefined>;
|
|
1495
|
+
readonly preloadResponse: Promise<any>;
|
|
1465
1496
|
readonly request: Request;
|
|
1466
1497
|
readonly resultingClientId: string;
|
|
1467
1498
|
respondWith(r: Response | PromiseLike<Response>): void;
|
|
@@ -2115,6 +2146,7 @@ declare var ImageBitmapRenderingContext: {
|
|
|
2115
2146
|
|
|
2116
2147
|
/** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */
|
|
2117
2148
|
interface ImageData {
|
|
2149
|
+
readonly colorSpace: PredefinedColorSpace;
|
|
2118
2150
|
/** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */
|
|
2119
2151
|
readonly data: Uint8ClampedArray;
|
|
2120
2152
|
/** Returns the actual dimensions of the data in the ImageData object, in pixels. */
|
|
@@ -2231,6 +2263,19 @@ declare var MessagePort: {
|
|
|
2231
2263
|
new(): MessagePort;
|
|
2232
2264
|
};
|
|
2233
2265
|
|
|
2266
|
+
/** Available only in secure contexts. */
|
|
2267
|
+
interface NavigationPreloadManager {
|
|
2268
|
+
disable(): Promise<void>;
|
|
2269
|
+
enable(): Promise<void>;
|
|
2270
|
+
getState(): Promise<NavigationPreloadState>;
|
|
2271
|
+
setHeaderValue(value: string): Promise<void>;
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2274
|
+
declare var NavigationPreloadManager: {
|
|
2275
|
+
prototype: NavigationPreloadManager;
|
|
2276
|
+
new(): NavigationPreloadManager;
|
|
2277
|
+
};
|
|
2278
|
+
|
|
2234
2279
|
interface NavigatorConcurrentHardware {
|
|
2235
2280
|
readonly hardwareConcurrency: number;
|
|
2236
2281
|
}
|
|
@@ -2254,6 +2299,11 @@ interface NavigatorLanguage {
|
|
|
2254
2299
|
readonly languages: ReadonlyArray<string>;
|
|
2255
2300
|
}
|
|
2256
2301
|
|
|
2302
|
+
/** Available only in secure contexts. */
|
|
2303
|
+
interface NavigatorLocks {
|
|
2304
|
+
readonly locks: LockManager;
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2257
2307
|
interface NavigatorNetworkInformation {
|
|
2258
2308
|
readonly connection: NetworkInformation;
|
|
2259
2309
|
}
|
|
@@ -2629,6 +2679,29 @@ declare var PushSubscriptionOptions: {
|
|
|
2629
2679
|
new(): PushSubscriptionOptions;
|
|
2630
2680
|
};
|
|
2631
2681
|
|
|
2682
|
+
interface RTCEncodedAudioFrame {
|
|
2683
|
+
data: ArrayBuffer;
|
|
2684
|
+
readonly timestamp: number;
|
|
2685
|
+
getMetadata(): RTCEncodedAudioFrameMetadata;
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2688
|
+
declare var RTCEncodedAudioFrame: {
|
|
2689
|
+
prototype: RTCEncodedAudioFrame;
|
|
2690
|
+
new(): RTCEncodedAudioFrame;
|
|
2691
|
+
};
|
|
2692
|
+
|
|
2693
|
+
interface RTCEncodedVideoFrame {
|
|
2694
|
+
data: ArrayBuffer;
|
|
2695
|
+
readonly timestamp: number;
|
|
2696
|
+
readonly type: RTCEncodedVideoFrameType;
|
|
2697
|
+
getMetadata(): RTCEncodedVideoFrameMetadata;
|
|
2698
|
+
}
|
|
2699
|
+
|
|
2700
|
+
declare var RTCEncodedVideoFrame: {
|
|
2701
|
+
prototype: RTCEncodedVideoFrame;
|
|
2702
|
+
new(): RTCEncodedVideoFrame;
|
|
2703
|
+
};
|
|
2704
|
+
|
|
2632
2705
|
/** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */
|
|
2633
2706
|
interface ReadableStream<R = any> {
|
|
2634
2707
|
readonly locked: boolean;
|
|
@@ -2704,7 +2777,7 @@ interface Request extends Body {
|
|
|
2704
2777
|
|
|
2705
2778
|
declare var Request: {
|
|
2706
2779
|
prototype: Request;
|
|
2707
|
-
new(input: RequestInfo, init?: RequestInit): Request;
|
|
2780
|
+
new(input: RequestInfo | URL, init?: RequestInit): Request;
|
|
2708
2781
|
};
|
|
2709
2782
|
|
|
2710
2783
|
/** This Fetch API interface represents the response to a request. */
|
|
@@ -2849,6 +2922,7 @@ interface ServiceWorkerRegistrationEventMap {
|
|
|
2849
2922
|
interface ServiceWorkerRegistration extends EventTarget {
|
|
2850
2923
|
readonly active: ServiceWorker | null;
|
|
2851
2924
|
readonly installing: ServiceWorker | null;
|
|
2925
|
+
readonly navigationPreload: NavigationPreloadManager;
|
|
2852
2926
|
onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
|
|
2853
2927
|
readonly pushManager: PushManager;
|
|
2854
2928
|
readonly scope: string;
|
|
@@ -2914,10 +2988,10 @@ interface SubtleCrypto {
|
|
|
2914
2988
|
encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
|
|
2915
2989
|
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
|
|
2916
2990
|
exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
|
|
2917
|
-
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage
|
|
2918
|
-
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage
|
|
2991
|
+
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
|
|
2992
|
+
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
2919
2993
|
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
|
|
2920
|
-
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage
|
|
2994
|
+
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
2921
2995
|
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
2922
2996
|
sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
|
|
2923
2997
|
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
@@ -3095,6 +3169,19 @@ declare var URLSearchParams: {
|
|
|
3095
3169
|
toString(): string;
|
|
3096
3170
|
};
|
|
3097
3171
|
|
|
3172
|
+
interface VideoColorSpace {
|
|
3173
|
+
readonly fullRange: boolean | null;
|
|
3174
|
+
readonly matrix: VideoMatrixCoefficients | null;
|
|
3175
|
+
readonly primaries: VideoColorPrimaries | null;
|
|
3176
|
+
readonly transfer: VideoTransferCharacteristics | null;
|
|
3177
|
+
toJSON(): VideoColorSpaceInit;
|
|
3178
|
+
}
|
|
3179
|
+
|
|
3180
|
+
declare var VideoColorSpace: {
|
|
3181
|
+
prototype: VideoColorSpace;
|
|
3182
|
+
new(init?: VideoColorSpaceInit): VideoColorSpace;
|
|
3183
|
+
};
|
|
3184
|
+
|
|
3098
3185
|
interface WEBGL_color_buffer_float {
|
|
3099
3186
|
readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
|
|
3100
3187
|
readonly RGBA32F_EXT: GLenum;
|
|
@@ -3150,13 +3237,6 @@ interface WEBGL_compressed_texture_etc1 {
|
|
|
3150
3237
|
readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum;
|
|
3151
3238
|
}
|
|
3152
3239
|
|
|
3153
|
-
interface WEBGL_compressed_texture_pvrtc {
|
|
3154
|
-
readonly COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: GLenum;
|
|
3155
|
-
readonly COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: GLenum;
|
|
3156
|
-
readonly COMPRESSED_RGB_PVRTC_2BPPV1_IMG: GLenum;
|
|
3157
|
-
readonly COMPRESSED_RGB_PVRTC_4BPPV1_IMG: GLenum;
|
|
3158
|
-
}
|
|
3159
|
-
|
|
3160
3240
|
/** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */
|
|
3161
3241
|
interface WEBGL_compressed_texture_s3tc {
|
|
3162
3242
|
readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum;
|
|
@@ -4647,7 +4727,6 @@ interface WebGLRenderingContextBase {
|
|
|
4647
4727
|
getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null;
|
|
4648
4728
|
getExtension(extensionName: "WEBGL_compressed_texture_etc"): WEBGL_compressed_texture_etc | null;
|
|
4649
4729
|
getExtension(extensionName: "WEBGL_compressed_texture_etc1"): WEBGL_compressed_texture_etc1 | null;
|
|
4650
|
-
getExtension(extensionName: "WEBGL_compressed_texture_pvrtc"): WEBGL_compressed_texture_pvrtc | null;
|
|
4651
4730
|
getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null;
|
|
4652
4731
|
getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null;
|
|
4653
4732
|
getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null;
|
|
@@ -5203,11 +5282,12 @@ interface WindowOrWorkerGlobalScope {
|
|
|
5203
5282
|
clearTimeout(id?: number): void;
|
|
5204
5283
|
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5205
5284
|
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5206
|
-
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
5285
|
+
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
5207
5286
|
queueMicrotask(callback: VoidFunction): void;
|
|
5208
5287
|
reportError(e: any): void;
|
|
5209
5288
|
setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
5210
5289
|
setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
5290
|
+
structuredClone(value: any, options?: StructuredSerializeOptions): any;
|
|
5211
5291
|
}
|
|
5212
5292
|
|
|
5213
5293
|
interface WorkerEventMap extends AbstractWorkerEventMap {
|
|
@@ -5291,7 +5371,7 @@ declare var WorkerLocation: {
|
|
|
5291
5371
|
};
|
|
5292
5372
|
|
|
5293
5373
|
/** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */
|
|
5294
|
-
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
|
|
5374
|
+
interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
|
|
5295
5375
|
readonly mediaCapabilities: MediaCapabilities;
|
|
5296
5376
|
}
|
|
5297
5377
|
|
|
@@ -5742,11 +5822,12 @@ declare function clearInterval(id?: number): void;
|
|
|
5742
5822
|
declare function clearTimeout(id?: number): void;
|
|
5743
5823
|
declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5744
5824
|
declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5745
|
-
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
5825
|
+
declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
5746
5826
|
declare function queueMicrotask(callback: VoidFunction): void;
|
|
5747
5827
|
declare function reportError(e: any): void;
|
|
5748
5828
|
declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
5749
5829
|
declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
5830
|
+
declare function structuredClone(value: any, options?: StructuredSerializeOptions): any;
|
|
5750
5831
|
declare function cancelAnimationFrame(handle: number): void;
|
|
5751
5832
|
declare function requestAnimationFrame(callback: FrameRequestCallback): number;
|
|
5752
5833
|
declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -5827,6 +5908,7 @@ type PermissionState = "denied" | "granted" | "prompt";
|
|
|
5827
5908
|
type PredefinedColorSpace = "display-p3" | "srgb";
|
|
5828
5909
|
type PremultiplyAlpha = "default" | "none" | "premultiply";
|
|
5829
5910
|
type PushEncryptionKeyName = "auth" | "p256dh";
|
|
5911
|
+
type RTCEncodedVideoFrameType = "delta" | "empty" | "key";
|
|
5830
5912
|
type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
|
|
5831
5913
|
type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
|
|
5832
5914
|
type RequestCredentials = "include" | "omit" | "same-origin";
|
|
@@ -5839,6 +5921,9 @@ type SecurityPolicyViolationEventDisposition = "enforce" | "report";
|
|
|
5839
5921
|
type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
|
|
5840
5922
|
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
|
|
5841
5923
|
type TransferFunction = "hlg" | "pq" | "srgb";
|
|
5924
|
+
type VideoColorPrimaries = "bt470bg" | "bt709" | "smpte170m";
|
|
5925
|
+
type VideoMatrixCoefficients = "bt470bg" | "bt709" | "rgb" | "smpte170m";
|
|
5926
|
+
type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m";
|
|
5842
5927
|
type WebGLPowerPreference = "default" | "high-performance" | "low-power";
|
|
5843
5928
|
type WorkerType = "classic" | "module";
|
|
5844
5929
|
type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
|
|
@@ -78,10 +78,10 @@ interface MessageEvent<T = any> {
|
|
|
78
78
|
|
|
79
79
|
interface SubtleCrypto {
|
|
80
80
|
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
81
|
-
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage
|
|
82
|
-
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage
|
|
81
|
+
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
|
|
82
|
+
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
83
83
|
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
|
|
84
|
-
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage
|
|
84
|
+
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
85
85
|
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
86
86
|
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>;
|
|
87
87
|
}
|
package/lib/protocol.d.ts
CHANGED
|
@@ -860,9 +860,12 @@ declare namespace ts.server.protocol {
|
|
|
860
860
|
*/
|
|
861
861
|
isWriteAccess: boolean;
|
|
862
862
|
/**
|
|
863
|
-
*
|
|
863
|
+
* Present only if the search was triggered from a declaration.
|
|
864
|
+
* True indicates that the references refers to the same symbol
|
|
865
|
+
* (i.e. has the same meaning) as the declaration that began the
|
|
866
|
+
* search.
|
|
864
867
|
*/
|
|
865
|
-
isDefinition
|
|
868
|
+
isDefinition?: boolean;
|
|
866
869
|
}
|
|
867
870
|
/**
|
|
868
871
|
* The body of a "references" response message.
|