mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Update LKG
This commit is contained in:
Vendored
+118
-67
@@ -361,14 +361,14 @@ interface String {
|
||||
|
||||
/**
|
||||
* Replaces text in a string, using a regular expression or search string.
|
||||
* @param searchValue A string that represents the regular expression.
|
||||
* @param searchValue A string to search for.
|
||||
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
|
||||
*/
|
||||
replace(searchValue: string, replaceValue: string): string;
|
||||
|
||||
/**
|
||||
* Replaces text in a string, using a regular expression or search string.
|
||||
* @param searchValue A string that represents the regular expression.
|
||||
* @param searchValue A string to search for.
|
||||
* @param replacer A function that returns the replacement text.
|
||||
*/
|
||||
replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string;
|
||||
@@ -1371,6 +1371,57 @@ interface PromiseLike<T> {
|
||||
onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): PromiseLike<TResult1 | TResult2>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the completion of an asynchronous operation
|
||||
*/
|
||||
interface Promise<T> {
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then(onfulfilled?: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult>(onfulfilled: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult>(onfulfilled: (value: T) => TResult | PromiseLike<TResult>, onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<TResult>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult1, TResult2>(onfulfilled: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
|
||||
|
||||
/**
|
||||
* Attaches a callback for only the rejection of the Promise.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
catch(onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
|
||||
|
||||
/**
|
||||
* Attaches a callback for only the rejection of the Promise.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
catch<TResult>(onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
|
||||
}
|
||||
|
||||
interface ArrayLike<T> {
|
||||
readonly length: number;
|
||||
readonly [n: number]: T;
|
||||
@@ -5529,7 +5580,7 @@ interface AudioContextBase extends EventTarget {
|
||||
onstatechange: (this: AudioContext, ev: Event) => any;
|
||||
readonly sampleRate: number;
|
||||
readonly state: string;
|
||||
close(): PromiseLike<void>;
|
||||
close(): Promise<void>;
|
||||
createAnalyser(): AnalyserNode;
|
||||
createBiquadFilter(): BiquadFilterNode;
|
||||
createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
|
||||
@@ -5549,14 +5600,14 @@ interface AudioContextBase extends EventTarget {
|
||||
createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
|
||||
createStereoPanner(): StereoPannerNode;
|
||||
createWaveShaper(): WaveShaperNode;
|
||||
decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): PromiseLike<AudioBuffer>;
|
||||
resume(): PromiseLike<void>;
|
||||
decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): Promise<AudioBuffer>;
|
||||
resume(): Promise<void>;
|
||||
addEventListener<K extends keyof AudioContextEventMap>(type: K, listener: (this: AudioContext, ev: AudioContextEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
interface AudioContext extends AudioContextBase {
|
||||
suspend(): PromiseLike<void>;
|
||||
suspend(): Promise<void>;
|
||||
}
|
||||
|
||||
declare var AudioContext: {
|
||||
@@ -6274,13 +6325,13 @@ declare var CSSSupportsRule: {
|
||||
}
|
||||
|
||||
interface Cache {
|
||||
add(request: RequestInfo): PromiseLike<void>;
|
||||
addAll(requests: RequestInfo[]): PromiseLike<void>;
|
||||
delete(request: RequestInfo, options?: CacheQueryOptions): PromiseLike<boolean>;
|
||||
add(request: RequestInfo): Promise<void>;
|
||||
addAll(requests: RequestInfo[]): Promise<void>;
|
||||
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
||||
keys(request?: RequestInfo, options?: CacheQueryOptions): any;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): PromiseLike<Response>;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response>;
|
||||
matchAll(request?: RequestInfo, options?: CacheQueryOptions): any;
|
||||
put(request: RequestInfo, response: Response): PromiseLike<void>;
|
||||
put(request: RequestInfo, response: Response): Promise<void>;
|
||||
}
|
||||
|
||||
declare var Cache: {
|
||||
@@ -6289,11 +6340,11 @@ declare var Cache: {
|
||||
}
|
||||
|
||||
interface CacheStorage {
|
||||
delete(cacheName: string): PromiseLike<boolean>;
|
||||
has(cacheName: string): PromiseLike<boolean>;
|
||||
delete(cacheName: string): Promise<boolean>;
|
||||
has(cacheName: string): Promise<boolean>;
|
||||
keys(): any;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): PromiseLike<any>;
|
||||
open(cacheName: string): PromiseLike<Cache>;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): Promise<any>;
|
||||
open(cacheName: string): Promise<Cache>;
|
||||
}
|
||||
|
||||
declare var CacheStorage: {
|
||||
@@ -9914,7 +9965,7 @@ interface HTMLMediaElement extends HTMLElement {
|
||||
* Loads and starts playback of a media resource.
|
||||
*/
|
||||
play(): void;
|
||||
setMediaKeys(mediaKeys: MediaKeys | null): PromiseLike<void>;
|
||||
setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
|
||||
readonly HAVE_CURRENT_DATA: number;
|
||||
readonly HAVE_ENOUGH_DATA: number;
|
||||
readonly HAVE_FUTURE_DATA: number;
|
||||
@@ -11492,7 +11543,7 @@ interface MSApp {
|
||||
execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
|
||||
execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
|
||||
getCurrentPriority(): string;
|
||||
getHtmlPrintDocumentSourceAsync(htmlDoc: any): PromiseLike<any>;
|
||||
getHtmlPrintDocumentSourceAsync(htmlDoc: any): Promise<any>;
|
||||
getViewId(view: any): any;
|
||||
isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
|
||||
pageHandlesAllApplicationActivations(enabled: boolean): void;
|
||||
@@ -11553,8 +11604,8 @@ declare var MSBlobBuilder: {
|
||||
}
|
||||
|
||||
interface MSCredentials {
|
||||
getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): PromiseLike<MSAssertion>;
|
||||
makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): PromiseLike<MSAssertion>;
|
||||
getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): Promise<MSAssertion>;
|
||||
makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): Promise<MSAssertion>;
|
||||
}
|
||||
|
||||
declare var MSCredentials: {
|
||||
@@ -11942,7 +11993,7 @@ interface MediaDevices extends EventTarget {
|
||||
ondevicechange: (this: MediaDevices, ev: Event) => any;
|
||||
enumerateDevices(): any;
|
||||
getSupportedConstraints(): MediaTrackSupportedConstraints;
|
||||
getUserMedia(constraints: MediaStreamConstraints): PromiseLike<MediaStream>;
|
||||
getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
|
||||
addEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -12001,15 +12052,15 @@ declare var MediaKeyMessageEvent: {
|
||||
}
|
||||
|
||||
interface MediaKeySession extends EventTarget {
|
||||
readonly closed: PromiseLike<void>;
|
||||
readonly closed: Promise<void>;
|
||||
readonly expiration: number;
|
||||
readonly keyStatuses: MediaKeyStatusMap;
|
||||
readonly sessionId: string;
|
||||
close(): PromiseLike<void>;
|
||||
generateRequest(initDataType: string, initData: any): PromiseLike<void>;
|
||||
load(sessionId: string): PromiseLike<boolean>;
|
||||
remove(): PromiseLike<void>;
|
||||
update(response: any): PromiseLike<void>;
|
||||
close(): Promise<void>;
|
||||
generateRequest(initDataType: string, initData: any): Promise<void>;
|
||||
load(sessionId: string): Promise<boolean>;
|
||||
remove(): Promise<void>;
|
||||
update(response: any): Promise<void>;
|
||||
}
|
||||
|
||||
declare var MediaKeySession: {
|
||||
@@ -12031,7 +12082,7 @@ declare var MediaKeyStatusMap: {
|
||||
|
||||
interface MediaKeySystemAccess {
|
||||
readonly keySystem: string;
|
||||
createMediaKeys(): PromiseLike<MediaKeys>;
|
||||
createMediaKeys(): Promise<MediaKeys>;
|
||||
getConfiguration(): MediaKeySystemConfiguration;
|
||||
}
|
||||
|
||||
@@ -12042,7 +12093,7 @@ declare var MediaKeySystemAccess: {
|
||||
|
||||
interface MediaKeys {
|
||||
createSession(sessionType?: string): MediaKeySession;
|
||||
setServerCertificate(serverCertificate: any): PromiseLike<void>;
|
||||
setServerCertificate(serverCertificate: any): Promise<void>;
|
||||
}
|
||||
|
||||
declare var MediaKeys: {
|
||||
@@ -12181,7 +12232,7 @@ interface MediaStreamTrack extends EventTarget {
|
||||
readonly readonly: boolean;
|
||||
readonly readyState: string;
|
||||
readonly remote: boolean;
|
||||
applyConstraints(constraints: MediaTrackConstraints): PromiseLike<void>;
|
||||
applyConstraints(constraints: MediaTrackConstraints): Promise<void>;
|
||||
clone(): MediaStreamTrack;
|
||||
getCapabilities(): MediaTrackCapabilities;
|
||||
getConstraints(): MediaTrackConstraints;
|
||||
@@ -12415,7 +12466,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
|
||||
getGamepads(): Gamepad[];
|
||||
javaEnabled(): boolean;
|
||||
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
|
||||
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): PromiseLike<MediaKeySystemAccess>;
|
||||
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise<MediaKeySystemAccess>;
|
||||
vibrate(pattern: number | number[]): boolean;
|
||||
}
|
||||
|
||||
@@ -12575,7 +12626,7 @@ interface Notification extends EventTarget {
|
||||
declare var Notification: {
|
||||
prototype: Notification;
|
||||
new(title: string, options?: NotificationOptions): Notification;
|
||||
requestPermission(callback?: NotificationPermissionCallback): PromiseLike<string>;
|
||||
requestPermission(callback?: NotificationPermissionCallback): Promise<string>;
|
||||
}
|
||||
|
||||
interface OES_element_index_uint {
|
||||
@@ -12646,8 +12697,8 @@ interface OfflineAudioContextEventMap extends AudioContextEventMap {
|
||||
interface OfflineAudioContext extends AudioContextBase {
|
||||
readonly length: number;
|
||||
oncomplete: (this: OfflineAudioContext, ev: OfflineAudioCompletionEvent) => any;
|
||||
startRendering(): PromiseLike<AudioBuffer>;
|
||||
suspend(suspendTime: number): PromiseLike<void>;
|
||||
startRendering(): Promise<AudioBuffer>;
|
||||
suspend(suspendTime: number): Promise<void>;
|
||||
addEventListener<K extends keyof OfflineAudioContextEventMap>(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -12762,8 +12813,8 @@ interface PaymentRequest extends EventTarget {
|
||||
readonly shippingAddress: PaymentAddress | null;
|
||||
readonly shippingOption: string | null;
|
||||
readonly shippingType: string | null;
|
||||
abort(): PromiseLike<void>;
|
||||
show(): PromiseLike<PaymentResponse>;
|
||||
abort(): Promise<void>;
|
||||
show(): Promise<PaymentResponse>;
|
||||
addEventListener<K extends keyof PaymentRequestEventMap>(type: K, listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -12774,7 +12825,7 @@ declare var PaymentRequest: {
|
||||
}
|
||||
|
||||
interface PaymentRequestUpdateEvent extends Event {
|
||||
updateWith(d: PromiseLike<PaymentDetails>): void;
|
||||
updateWith(d: Promise<PaymentDetails>): void;
|
||||
}
|
||||
|
||||
declare var PaymentRequestUpdateEvent: {
|
||||
@@ -12790,7 +12841,7 @@ interface PaymentResponse {
|
||||
readonly payerPhone: string | null;
|
||||
readonly shippingAddress: PaymentAddress | null;
|
||||
readonly shippingOption: string | null;
|
||||
complete(result?: string): PromiseLike<void>;
|
||||
complete(result?: string): Promise<void>;
|
||||
toJSON(): any;
|
||||
}
|
||||
|
||||
@@ -13116,9 +13167,9 @@ declare var ProgressEvent: {
|
||||
}
|
||||
|
||||
interface PushManager {
|
||||
getSubscription(): PromiseLike<PushSubscription>;
|
||||
permissionState(options?: PushSubscriptionOptionsInit): PromiseLike<string>;
|
||||
subscribe(options?: PushSubscriptionOptionsInit): PromiseLike<PushSubscription>;
|
||||
getSubscription(): Promise<PushSubscription>;
|
||||
permissionState(options?: PushSubscriptionOptionsInit): Promise<string>;
|
||||
subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
|
||||
}
|
||||
|
||||
declare var PushManager: {
|
||||
@@ -13131,7 +13182,7 @@ interface PushSubscription {
|
||||
readonly options: PushSubscriptionOptions;
|
||||
getKey(name: string): ArrayBuffer | null;
|
||||
toJSON(): any;
|
||||
unsubscribe(): PromiseLike<boolean>;
|
||||
unsubscribe(): Promise<boolean>;
|
||||
}
|
||||
|
||||
declare var PushSubscription: {
|
||||
@@ -13325,19 +13376,19 @@ interface RTCPeerConnection extends EventTarget {
|
||||
onsignalingstatechange: (this: RTCPeerConnection, ev: Event) => any;
|
||||
readonly remoteDescription: RTCSessionDescription | null;
|
||||
readonly signalingState: string;
|
||||
addIceCandidate(candidate: RTCIceCandidate, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<void>;
|
||||
addIceCandidate(candidate: RTCIceCandidate, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
addStream(stream: MediaStream): void;
|
||||
close(): void;
|
||||
createAnswer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<RTCSessionDescription>;
|
||||
createOffer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback, options?: RTCOfferOptions): PromiseLike<RTCSessionDescription>;
|
||||
createAnswer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback): Promise<RTCSessionDescription>;
|
||||
createOffer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback, options?: RTCOfferOptions): Promise<RTCSessionDescription>;
|
||||
getConfiguration(): RTCConfiguration;
|
||||
getLocalStreams(): MediaStream[];
|
||||
getRemoteStreams(): MediaStream[];
|
||||
getStats(selector: MediaStreamTrack | null, successCallback?: RTCStatsCallback, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<RTCStatsReport>;
|
||||
getStats(selector: MediaStreamTrack | null, successCallback?: RTCStatsCallback, failureCallback?: RTCPeerConnectionErrorCallback): Promise<RTCStatsReport>;
|
||||
getStreamById(streamId: string): MediaStream | null;
|
||||
removeStream(stream: MediaStream): void;
|
||||
setLocalDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<void>;
|
||||
setRemoteDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<void>;
|
||||
setLocalDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
setRemoteDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
addEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -13443,8 +13494,8 @@ declare var RTCSsrcConflictEvent: {
|
||||
}
|
||||
|
||||
interface RTCStatsProvider extends EventTarget {
|
||||
getStats(): PromiseLike<RTCStatsReport>;
|
||||
msGetStats(): PromiseLike<RTCStatsReport>;
|
||||
getStats(): Promise<RTCStatsReport>;
|
||||
msGetStats(): Promise<RTCStatsReport>;
|
||||
}
|
||||
|
||||
declare var RTCStatsProvider: {
|
||||
@@ -13498,7 +13549,7 @@ declare var Range: {
|
||||
|
||||
interface ReadableStream {
|
||||
readonly locked: boolean;
|
||||
cancel(): PromiseLike<void>;
|
||||
cancel(): Promise<void>;
|
||||
getReader(): ReadableStreamReader;
|
||||
}
|
||||
|
||||
@@ -13508,8 +13559,8 @@ declare var ReadableStream: {
|
||||
}
|
||||
|
||||
interface ReadableStreamReader {
|
||||
cancel(): PromiseLike<void>;
|
||||
read(): PromiseLike<any>;
|
||||
cancel(): Promise<void>;
|
||||
read(): Promise<any>;
|
||||
releaseLock(): void;
|
||||
}
|
||||
|
||||
@@ -15483,10 +15534,10 @@ interface ServiceWorkerContainer extends EventTarget {
|
||||
readonly controller: ServiceWorker | null;
|
||||
oncontrollerchange: (this: ServiceWorkerContainer, ev: Event) => any;
|
||||
onmessage: (this: ServiceWorkerContainer, ev: ServiceWorkerMessageEvent) => any;
|
||||
readonly ready: PromiseLike<ServiceWorkerRegistration>;
|
||||
getRegistration(clientURL?: USVString): PromiseLike<any>;
|
||||
readonly ready: Promise<ServiceWorkerRegistration>;
|
||||
getRegistration(clientURL?: USVString): Promise<any>;
|
||||
getRegistrations(): any;
|
||||
register(scriptURL: USVString, options?: RegistrationOptions): PromiseLike<ServiceWorkerRegistration>;
|
||||
register(scriptURL: USVString, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
|
||||
addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -15522,9 +15573,9 @@ interface ServiceWorkerRegistration extends EventTarget {
|
||||
readonly sync: SyncManager;
|
||||
readonly waiting: ServiceWorker | null;
|
||||
getNotifications(filter?: GetNotificationOptions): any;
|
||||
showNotification(title: string, options?: NotificationOptions): PromiseLike<void>;
|
||||
unregister(): PromiseLike<boolean>;
|
||||
update(): PromiseLike<void>;
|
||||
showNotification(title: string, options?: NotificationOptions): Promise<void>;
|
||||
unregister(): Promise<boolean>;
|
||||
update(): Promise<void>;
|
||||
addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -15759,7 +15810,7 @@ declare var SubtleCrypto: {
|
||||
|
||||
interface SyncManager {
|
||||
getTags(): any;
|
||||
register(tag: string): PromiseLike<void>;
|
||||
register(tag: string): Promise<void>;
|
||||
}
|
||||
|
||||
declare var SyncManager: {
|
||||
@@ -16173,8 +16224,8 @@ declare var WaveShaperNode: {
|
||||
}
|
||||
|
||||
interface WebAuthentication {
|
||||
getAssertion(assertionChallenge: any, options?: AssertionOptions): PromiseLike<WebAuthnAssertion>;
|
||||
makeCredential(accountInformation: Account, cryptoParameters: ScopedCredentialParameters[], attestationChallenge: any, options?: ScopedCredentialOptions): PromiseLike<ScopedCredentialInfo>;
|
||||
getAssertion(assertionChallenge: any, options?: AssertionOptions): Promise<WebAuthnAssertion>;
|
||||
makeCredential(accountInformation: Account, cryptoParameters: ScopedCredentialParameters[], attestationChallenge: any, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
|
||||
}
|
||||
|
||||
declare var WebAuthentication: {
|
||||
@@ -17667,10 +17718,10 @@ interface AbstractWorker {
|
||||
|
||||
interface Body {
|
||||
readonly bodyUsed: boolean;
|
||||
arrayBuffer(): PromiseLike<ArrayBuffer>;
|
||||
blob(): PromiseLike<Blob>;
|
||||
json(): PromiseLike<any>;
|
||||
text(): PromiseLike<string>;
|
||||
arrayBuffer(): Promise<ArrayBuffer>;
|
||||
blob(): Promise<Blob>;
|
||||
json(): Promise<any>;
|
||||
text(): Promise<string>;
|
||||
}
|
||||
|
||||
interface CanvasPathMethods {
|
||||
@@ -17811,7 +17862,7 @@ interface GlobalEventHandlers {
|
||||
}
|
||||
|
||||
interface GlobalFetch {
|
||||
fetch(input: RequestInfo, init?: RequestInit): PromiseLike<Response>;
|
||||
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
||||
}
|
||||
|
||||
interface HTMLTableAlignment {
|
||||
@@ -19068,7 +19119,7 @@ declare var onwheel: (this: Window, ev: WheelEvent) => any;
|
||||
declare var indexedDB: IDBFactory;
|
||||
declare function atob(encodedString: string): string;
|
||||
declare function btoa(rawString: string): string;
|
||||
declare function fetch(input: RequestInfo, init?: RequestInit): PromiseLike<Response>;
|
||||
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
||||
declare function addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
|
||||
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
type AAGUID = string;
|
||||
|
||||
Vendored
+65
-65
@@ -1351,7 +1351,7 @@ interface AudioContextBase extends EventTarget {
|
||||
onstatechange: (this: AudioContext, ev: Event) => any;
|
||||
readonly sampleRate: number;
|
||||
readonly state: string;
|
||||
close(): PromiseLike<void>;
|
||||
close(): Promise<void>;
|
||||
createAnalyser(): AnalyserNode;
|
||||
createBiquadFilter(): BiquadFilterNode;
|
||||
createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
|
||||
@@ -1371,14 +1371,14 @@ interface AudioContextBase extends EventTarget {
|
||||
createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
|
||||
createStereoPanner(): StereoPannerNode;
|
||||
createWaveShaper(): WaveShaperNode;
|
||||
decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): PromiseLike<AudioBuffer>;
|
||||
resume(): PromiseLike<void>;
|
||||
decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): Promise<AudioBuffer>;
|
||||
resume(): Promise<void>;
|
||||
addEventListener<K extends keyof AudioContextEventMap>(type: K, listener: (this: AudioContext, ev: AudioContextEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
interface AudioContext extends AudioContextBase {
|
||||
suspend(): PromiseLike<void>;
|
||||
suspend(): Promise<void>;
|
||||
}
|
||||
|
||||
declare var AudioContext: {
|
||||
@@ -2096,13 +2096,13 @@ declare var CSSSupportsRule: {
|
||||
}
|
||||
|
||||
interface Cache {
|
||||
add(request: RequestInfo): PromiseLike<void>;
|
||||
addAll(requests: RequestInfo[]): PromiseLike<void>;
|
||||
delete(request: RequestInfo, options?: CacheQueryOptions): PromiseLike<boolean>;
|
||||
add(request: RequestInfo): Promise<void>;
|
||||
addAll(requests: RequestInfo[]): Promise<void>;
|
||||
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
||||
keys(request?: RequestInfo, options?: CacheQueryOptions): any;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): PromiseLike<Response>;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response>;
|
||||
matchAll(request?: RequestInfo, options?: CacheQueryOptions): any;
|
||||
put(request: RequestInfo, response: Response): PromiseLike<void>;
|
||||
put(request: RequestInfo, response: Response): Promise<void>;
|
||||
}
|
||||
|
||||
declare var Cache: {
|
||||
@@ -2111,11 +2111,11 @@ declare var Cache: {
|
||||
}
|
||||
|
||||
interface CacheStorage {
|
||||
delete(cacheName: string): PromiseLike<boolean>;
|
||||
has(cacheName: string): PromiseLike<boolean>;
|
||||
delete(cacheName: string): Promise<boolean>;
|
||||
has(cacheName: string): Promise<boolean>;
|
||||
keys(): any;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): PromiseLike<any>;
|
||||
open(cacheName: string): PromiseLike<Cache>;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): Promise<any>;
|
||||
open(cacheName: string): Promise<Cache>;
|
||||
}
|
||||
|
||||
declare var CacheStorage: {
|
||||
@@ -5736,7 +5736,7 @@ interface HTMLMediaElement extends HTMLElement {
|
||||
* Loads and starts playback of a media resource.
|
||||
*/
|
||||
play(): void;
|
||||
setMediaKeys(mediaKeys: MediaKeys | null): PromiseLike<void>;
|
||||
setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
|
||||
readonly HAVE_CURRENT_DATA: number;
|
||||
readonly HAVE_ENOUGH_DATA: number;
|
||||
readonly HAVE_FUTURE_DATA: number;
|
||||
@@ -7314,7 +7314,7 @@ interface MSApp {
|
||||
execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
|
||||
execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
|
||||
getCurrentPriority(): string;
|
||||
getHtmlPrintDocumentSourceAsync(htmlDoc: any): PromiseLike<any>;
|
||||
getHtmlPrintDocumentSourceAsync(htmlDoc: any): Promise<any>;
|
||||
getViewId(view: any): any;
|
||||
isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
|
||||
pageHandlesAllApplicationActivations(enabled: boolean): void;
|
||||
@@ -7375,8 +7375,8 @@ declare var MSBlobBuilder: {
|
||||
}
|
||||
|
||||
interface MSCredentials {
|
||||
getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): PromiseLike<MSAssertion>;
|
||||
makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): PromiseLike<MSAssertion>;
|
||||
getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): Promise<MSAssertion>;
|
||||
makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): Promise<MSAssertion>;
|
||||
}
|
||||
|
||||
declare var MSCredentials: {
|
||||
@@ -7764,7 +7764,7 @@ interface MediaDevices extends EventTarget {
|
||||
ondevicechange: (this: MediaDevices, ev: Event) => any;
|
||||
enumerateDevices(): any;
|
||||
getSupportedConstraints(): MediaTrackSupportedConstraints;
|
||||
getUserMedia(constraints: MediaStreamConstraints): PromiseLike<MediaStream>;
|
||||
getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
|
||||
addEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -7823,15 +7823,15 @@ declare var MediaKeyMessageEvent: {
|
||||
}
|
||||
|
||||
interface MediaKeySession extends EventTarget {
|
||||
readonly closed: PromiseLike<void>;
|
||||
readonly closed: Promise<void>;
|
||||
readonly expiration: number;
|
||||
readonly keyStatuses: MediaKeyStatusMap;
|
||||
readonly sessionId: string;
|
||||
close(): PromiseLike<void>;
|
||||
generateRequest(initDataType: string, initData: any): PromiseLike<void>;
|
||||
load(sessionId: string): PromiseLike<boolean>;
|
||||
remove(): PromiseLike<void>;
|
||||
update(response: any): PromiseLike<void>;
|
||||
close(): Promise<void>;
|
||||
generateRequest(initDataType: string, initData: any): Promise<void>;
|
||||
load(sessionId: string): Promise<boolean>;
|
||||
remove(): Promise<void>;
|
||||
update(response: any): Promise<void>;
|
||||
}
|
||||
|
||||
declare var MediaKeySession: {
|
||||
@@ -7853,7 +7853,7 @@ declare var MediaKeyStatusMap: {
|
||||
|
||||
interface MediaKeySystemAccess {
|
||||
readonly keySystem: string;
|
||||
createMediaKeys(): PromiseLike<MediaKeys>;
|
||||
createMediaKeys(): Promise<MediaKeys>;
|
||||
getConfiguration(): MediaKeySystemConfiguration;
|
||||
}
|
||||
|
||||
@@ -7864,7 +7864,7 @@ declare var MediaKeySystemAccess: {
|
||||
|
||||
interface MediaKeys {
|
||||
createSession(sessionType?: string): MediaKeySession;
|
||||
setServerCertificate(serverCertificate: any): PromiseLike<void>;
|
||||
setServerCertificate(serverCertificate: any): Promise<void>;
|
||||
}
|
||||
|
||||
declare var MediaKeys: {
|
||||
@@ -8003,7 +8003,7 @@ interface MediaStreamTrack extends EventTarget {
|
||||
readonly readonly: boolean;
|
||||
readonly readyState: string;
|
||||
readonly remote: boolean;
|
||||
applyConstraints(constraints: MediaTrackConstraints): PromiseLike<void>;
|
||||
applyConstraints(constraints: MediaTrackConstraints): Promise<void>;
|
||||
clone(): MediaStreamTrack;
|
||||
getCapabilities(): MediaTrackCapabilities;
|
||||
getConstraints(): MediaTrackConstraints;
|
||||
@@ -8237,7 +8237,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
|
||||
getGamepads(): Gamepad[];
|
||||
javaEnabled(): boolean;
|
||||
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
|
||||
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): PromiseLike<MediaKeySystemAccess>;
|
||||
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise<MediaKeySystemAccess>;
|
||||
vibrate(pattern: number | number[]): boolean;
|
||||
}
|
||||
|
||||
@@ -8397,7 +8397,7 @@ interface Notification extends EventTarget {
|
||||
declare var Notification: {
|
||||
prototype: Notification;
|
||||
new(title: string, options?: NotificationOptions): Notification;
|
||||
requestPermission(callback?: NotificationPermissionCallback): PromiseLike<string>;
|
||||
requestPermission(callback?: NotificationPermissionCallback): Promise<string>;
|
||||
}
|
||||
|
||||
interface OES_element_index_uint {
|
||||
@@ -8468,8 +8468,8 @@ interface OfflineAudioContextEventMap extends AudioContextEventMap {
|
||||
interface OfflineAudioContext extends AudioContextBase {
|
||||
readonly length: number;
|
||||
oncomplete: (this: OfflineAudioContext, ev: OfflineAudioCompletionEvent) => any;
|
||||
startRendering(): PromiseLike<AudioBuffer>;
|
||||
suspend(suspendTime: number): PromiseLike<void>;
|
||||
startRendering(): Promise<AudioBuffer>;
|
||||
suspend(suspendTime: number): Promise<void>;
|
||||
addEventListener<K extends keyof OfflineAudioContextEventMap>(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -8584,8 +8584,8 @@ interface PaymentRequest extends EventTarget {
|
||||
readonly shippingAddress: PaymentAddress | null;
|
||||
readonly shippingOption: string | null;
|
||||
readonly shippingType: string | null;
|
||||
abort(): PromiseLike<void>;
|
||||
show(): PromiseLike<PaymentResponse>;
|
||||
abort(): Promise<void>;
|
||||
show(): Promise<PaymentResponse>;
|
||||
addEventListener<K extends keyof PaymentRequestEventMap>(type: K, listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -8596,7 +8596,7 @@ declare var PaymentRequest: {
|
||||
}
|
||||
|
||||
interface PaymentRequestUpdateEvent extends Event {
|
||||
updateWith(d: PromiseLike<PaymentDetails>): void;
|
||||
updateWith(d: Promise<PaymentDetails>): void;
|
||||
}
|
||||
|
||||
declare var PaymentRequestUpdateEvent: {
|
||||
@@ -8612,7 +8612,7 @@ interface PaymentResponse {
|
||||
readonly payerPhone: string | null;
|
||||
readonly shippingAddress: PaymentAddress | null;
|
||||
readonly shippingOption: string | null;
|
||||
complete(result?: string): PromiseLike<void>;
|
||||
complete(result?: string): Promise<void>;
|
||||
toJSON(): any;
|
||||
}
|
||||
|
||||
@@ -8938,9 +8938,9 @@ declare var ProgressEvent: {
|
||||
}
|
||||
|
||||
interface PushManager {
|
||||
getSubscription(): PromiseLike<PushSubscription>;
|
||||
permissionState(options?: PushSubscriptionOptionsInit): PromiseLike<string>;
|
||||
subscribe(options?: PushSubscriptionOptionsInit): PromiseLike<PushSubscription>;
|
||||
getSubscription(): Promise<PushSubscription>;
|
||||
permissionState(options?: PushSubscriptionOptionsInit): Promise<string>;
|
||||
subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
|
||||
}
|
||||
|
||||
declare var PushManager: {
|
||||
@@ -8953,7 +8953,7 @@ interface PushSubscription {
|
||||
readonly options: PushSubscriptionOptions;
|
||||
getKey(name: string): ArrayBuffer | null;
|
||||
toJSON(): any;
|
||||
unsubscribe(): PromiseLike<boolean>;
|
||||
unsubscribe(): Promise<boolean>;
|
||||
}
|
||||
|
||||
declare var PushSubscription: {
|
||||
@@ -9147,19 +9147,19 @@ interface RTCPeerConnection extends EventTarget {
|
||||
onsignalingstatechange: (this: RTCPeerConnection, ev: Event) => any;
|
||||
readonly remoteDescription: RTCSessionDescription | null;
|
||||
readonly signalingState: string;
|
||||
addIceCandidate(candidate: RTCIceCandidate, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<void>;
|
||||
addIceCandidate(candidate: RTCIceCandidate, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
addStream(stream: MediaStream): void;
|
||||
close(): void;
|
||||
createAnswer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<RTCSessionDescription>;
|
||||
createOffer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback, options?: RTCOfferOptions): PromiseLike<RTCSessionDescription>;
|
||||
createAnswer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback): Promise<RTCSessionDescription>;
|
||||
createOffer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback, options?: RTCOfferOptions): Promise<RTCSessionDescription>;
|
||||
getConfiguration(): RTCConfiguration;
|
||||
getLocalStreams(): MediaStream[];
|
||||
getRemoteStreams(): MediaStream[];
|
||||
getStats(selector: MediaStreamTrack | null, successCallback?: RTCStatsCallback, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<RTCStatsReport>;
|
||||
getStats(selector: MediaStreamTrack | null, successCallback?: RTCStatsCallback, failureCallback?: RTCPeerConnectionErrorCallback): Promise<RTCStatsReport>;
|
||||
getStreamById(streamId: string): MediaStream | null;
|
||||
removeStream(stream: MediaStream): void;
|
||||
setLocalDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<void>;
|
||||
setRemoteDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<void>;
|
||||
setLocalDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
setRemoteDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
addEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -9265,8 +9265,8 @@ declare var RTCSsrcConflictEvent: {
|
||||
}
|
||||
|
||||
interface RTCStatsProvider extends EventTarget {
|
||||
getStats(): PromiseLike<RTCStatsReport>;
|
||||
msGetStats(): PromiseLike<RTCStatsReport>;
|
||||
getStats(): Promise<RTCStatsReport>;
|
||||
msGetStats(): Promise<RTCStatsReport>;
|
||||
}
|
||||
|
||||
declare var RTCStatsProvider: {
|
||||
@@ -9320,7 +9320,7 @@ declare var Range: {
|
||||
|
||||
interface ReadableStream {
|
||||
readonly locked: boolean;
|
||||
cancel(): PromiseLike<void>;
|
||||
cancel(): Promise<void>;
|
||||
getReader(): ReadableStreamReader;
|
||||
}
|
||||
|
||||
@@ -9330,8 +9330,8 @@ declare var ReadableStream: {
|
||||
}
|
||||
|
||||
interface ReadableStreamReader {
|
||||
cancel(): PromiseLike<void>;
|
||||
read(): PromiseLike<any>;
|
||||
cancel(): Promise<void>;
|
||||
read(): Promise<any>;
|
||||
releaseLock(): void;
|
||||
}
|
||||
|
||||
@@ -11305,10 +11305,10 @@ interface ServiceWorkerContainer extends EventTarget {
|
||||
readonly controller: ServiceWorker | null;
|
||||
oncontrollerchange: (this: ServiceWorkerContainer, ev: Event) => any;
|
||||
onmessage: (this: ServiceWorkerContainer, ev: ServiceWorkerMessageEvent) => any;
|
||||
readonly ready: PromiseLike<ServiceWorkerRegistration>;
|
||||
getRegistration(clientURL?: USVString): PromiseLike<any>;
|
||||
readonly ready: Promise<ServiceWorkerRegistration>;
|
||||
getRegistration(clientURL?: USVString): Promise<any>;
|
||||
getRegistrations(): any;
|
||||
register(scriptURL: USVString, options?: RegistrationOptions): PromiseLike<ServiceWorkerRegistration>;
|
||||
register(scriptURL: USVString, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
|
||||
addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -11344,9 +11344,9 @@ interface ServiceWorkerRegistration extends EventTarget {
|
||||
readonly sync: SyncManager;
|
||||
readonly waiting: ServiceWorker | null;
|
||||
getNotifications(filter?: GetNotificationOptions): any;
|
||||
showNotification(title: string, options?: NotificationOptions): PromiseLike<void>;
|
||||
unregister(): PromiseLike<boolean>;
|
||||
update(): PromiseLike<void>;
|
||||
showNotification(title: string, options?: NotificationOptions): Promise<void>;
|
||||
unregister(): Promise<boolean>;
|
||||
update(): Promise<void>;
|
||||
addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -11581,7 +11581,7 @@ declare var SubtleCrypto: {
|
||||
|
||||
interface SyncManager {
|
||||
getTags(): any;
|
||||
register(tag: string): PromiseLike<void>;
|
||||
register(tag: string): Promise<void>;
|
||||
}
|
||||
|
||||
declare var SyncManager: {
|
||||
@@ -11995,8 +11995,8 @@ declare var WaveShaperNode: {
|
||||
}
|
||||
|
||||
interface WebAuthentication {
|
||||
getAssertion(assertionChallenge: any, options?: AssertionOptions): PromiseLike<WebAuthnAssertion>;
|
||||
makeCredential(accountInformation: Account, cryptoParameters: ScopedCredentialParameters[], attestationChallenge: any, options?: ScopedCredentialOptions): PromiseLike<ScopedCredentialInfo>;
|
||||
getAssertion(assertionChallenge: any, options?: AssertionOptions): Promise<WebAuthnAssertion>;
|
||||
makeCredential(accountInformation: Account, cryptoParameters: ScopedCredentialParameters[], attestationChallenge: any, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
|
||||
}
|
||||
|
||||
declare var WebAuthentication: {
|
||||
@@ -13489,10 +13489,10 @@ interface AbstractWorker {
|
||||
|
||||
interface Body {
|
||||
readonly bodyUsed: boolean;
|
||||
arrayBuffer(): PromiseLike<ArrayBuffer>;
|
||||
blob(): PromiseLike<Blob>;
|
||||
json(): PromiseLike<any>;
|
||||
text(): PromiseLike<string>;
|
||||
arrayBuffer(): Promise<ArrayBuffer>;
|
||||
blob(): Promise<Blob>;
|
||||
json(): Promise<any>;
|
||||
text(): Promise<string>;
|
||||
}
|
||||
|
||||
interface CanvasPathMethods {
|
||||
@@ -13633,7 +13633,7 @@ interface GlobalEventHandlers {
|
||||
}
|
||||
|
||||
interface GlobalFetch {
|
||||
fetch(input: RequestInfo, init?: RequestInit): PromiseLike<Response>;
|
||||
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
||||
}
|
||||
|
||||
interface HTMLTableAlignment {
|
||||
@@ -14890,7 +14890,7 @@ declare var onwheel: (this: Window, ev: WheelEvent) => any;
|
||||
declare var indexedDB: IDBFactory;
|
||||
declare function atob(encodedString: string): string;
|
||||
declare function btoa(rawString: string): string;
|
||||
declare function fetch(input: RequestInfo, init?: RequestInit): PromiseLike<Response>;
|
||||
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
||||
declare function addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
|
||||
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
type AAGUID = string;
|
||||
|
||||
Vendored
-50
@@ -18,56 +18,6 @@ and limitations under the License.
|
||||
/// <reference no-default-lib="true"/>
|
||||
|
||||
|
||||
/**
|
||||
* Represents the completion of an asynchronous operation
|
||||
*/
|
||||
interface Promise<T> {
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then(onfulfilled?: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult>(onfulfilled: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult>(onfulfilled: (value: T) => TResult | PromiseLike<TResult>, onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<TResult>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult1, TResult2>(onfulfilled: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
|
||||
|
||||
/**
|
||||
* Attaches a callback for only the rejection of the Promise.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
catch(onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
|
||||
|
||||
/**
|
||||
* Attaches a callback for only the rejection of the Promise.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
catch<TResult>(onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
|
||||
}
|
||||
|
||||
interface PromiseConstructor {
|
||||
/**
|
||||
|
||||
Vendored
+53
-2
@@ -361,14 +361,14 @@ interface String {
|
||||
|
||||
/**
|
||||
* Replaces text in a string, using a regular expression or search string.
|
||||
* @param searchValue A string that represents the regular expression.
|
||||
* @param searchValue A string to search for.
|
||||
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
|
||||
*/
|
||||
replace(searchValue: string, replaceValue: string): string;
|
||||
|
||||
/**
|
||||
* Replaces text in a string, using a regular expression or search string.
|
||||
* @param searchValue A string that represents the regular expression.
|
||||
* @param searchValue A string to search for.
|
||||
* @param replacer A function that returns the replacement text.
|
||||
*/
|
||||
replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string;
|
||||
@@ -1371,6 +1371,57 @@ interface PromiseLike<T> {
|
||||
onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): PromiseLike<TResult1 | TResult2>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the completion of an asynchronous operation
|
||||
*/
|
||||
interface Promise<T> {
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then(onfulfilled?: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult>(onfulfilled: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult>(onfulfilled: (value: T) => TResult | PromiseLike<TResult>, onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<TResult>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult1, TResult2>(onfulfilled: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
|
||||
|
||||
/**
|
||||
* Attaches a callback for only the rejection of the Promise.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
catch(onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
|
||||
|
||||
/**
|
||||
* Attaches a callback for only the rejection of the Promise.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
catch<TResult>(onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
|
||||
}
|
||||
|
||||
interface ArrayLike<T> {
|
||||
readonly length: number;
|
||||
readonly [n: number]: T;
|
||||
|
||||
Vendored
+118
-117
@@ -361,14 +361,14 @@ interface String {
|
||||
|
||||
/**
|
||||
* Replaces text in a string, using a regular expression or search string.
|
||||
* @param searchValue A string that represents the regular expression.
|
||||
* @param searchValue A string to search for.
|
||||
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
|
||||
*/
|
||||
replace(searchValue: string, replaceValue: string): string;
|
||||
|
||||
/**
|
||||
* Replaces text in a string, using a regular expression or search string.
|
||||
* @param searchValue A string that represents the regular expression.
|
||||
* @param searchValue A string to search for.
|
||||
* @param replacer A function that returns the replacement text.
|
||||
*/
|
||||
replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string;
|
||||
@@ -1371,6 +1371,57 @@ interface PromiseLike<T> {
|
||||
onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): PromiseLike<TResult1 | TResult2>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the completion of an asynchronous operation
|
||||
*/
|
||||
interface Promise<T> {
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then(onfulfilled?: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult>(onfulfilled: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult>(onfulfilled: (value: T) => TResult | PromiseLike<TResult>, onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<TResult>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult1, TResult2>(onfulfilled: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
|
||||
|
||||
/**
|
||||
* Attaches a callback for only the rejection of the Promise.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
catch(onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
|
||||
|
||||
/**
|
||||
* Attaches a callback for only the rejection of the Promise.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
catch<TResult>(onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
|
||||
}
|
||||
|
||||
interface ArrayLike<T> {
|
||||
readonly length: number;
|
||||
readonly [n: number]: T;
|
||||
@@ -5257,56 +5308,6 @@ interface Float64ArrayConstructor {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Represents the completion of an asynchronous operation
|
||||
*/
|
||||
interface Promise<T> {
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then(onfulfilled?: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult>(onfulfilled: ((value: T) => T | PromiseLike<T>) | undefined | null, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult>(onfulfilled: (value: T) => TResult | PromiseLike<TResult>, onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<TResult>;
|
||||
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult1, TResult2>(onfulfilled: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
|
||||
|
||||
/**
|
||||
* Attaches a callback for only the rejection of the Promise.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
catch(onrejected?: ((reason: any) => T | PromiseLike<T>) | undefined | null): Promise<T>;
|
||||
|
||||
/**
|
||||
* Attaches a callback for only the rejection of the Promise.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of the callback.
|
||||
*/
|
||||
catch<TResult>(onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
|
||||
}
|
||||
|
||||
interface PromiseConstructor {
|
||||
/**
|
||||
@@ -7251,7 +7252,7 @@ interface AudioContextBase extends EventTarget {
|
||||
onstatechange: (this: AudioContext, ev: Event) => any;
|
||||
readonly sampleRate: number;
|
||||
readonly state: string;
|
||||
close(): PromiseLike<void>;
|
||||
close(): Promise<void>;
|
||||
createAnalyser(): AnalyserNode;
|
||||
createBiquadFilter(): BiquadFilterNode;
|
||||
createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
|
||||
@@ -7271,14 +7272,14 @@ interface AudioContextBase extends EventTarget {
|
||||
createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
|
||||
createStereoPanner(): StereoPannerNode;
|
||||
createWaveShaper(): WaveShaperNode;
|
||||
decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): PromiseLike<AudioBuffer>;
|
||||
resume(): PromiseLike<void>;
|
||||
decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): Promise<AudioBuffer>;
|
||||
resume(): Promise<void>;
|
||||
addEventListener<K extends keyof AudioContextEventMap>(type: K, listener: (this: AudioContext, ev: AudioContextEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
|
||||
interface AudioContext extends AudioContextBase {
|
||||
suspend(): PromiseLike<void>;
|
||||
suspend(): Promise<void>;
|
||||
}
|
||||
|
||||
declare var AudioContext: {
|
||||
@@ -7996,13 +7997,13 @@ declare var CSSSupportsRule: {
|
||||
}
|
||||
|
||||
interface Cache {
|
||||
add(request: RequestInfo): PromiseLike<void>;
|
||||
addAll(requests: RequestInfo[]): PromiseLike<void>;
|
||||
delete(request: RequestInfo, options?: CacheQueryOptions): PromiseLike<boolean>;
|
||||
add(request: RequestInfo): Promise<void>;
|
||||
addAll(requests: RequestInfo[]): Promise<void>;
|
||||
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
||||
keys(request?: RequestInfo, options?: CacheQueryOptions): any;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): PromiseLike<Response>;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response>;
|
||||
matchAll(request?: RequestInfo, options?: CacheQueryOptions): any;
|
||||
put(request: RequestInfo, response: Response): PromiseLike<void>;
|
||||
put(request: RequestInfo, response: Response): Promise<void>;
|
||||
}
|
||||
|
||||
declare var Cache: {
|
||||
@@ -8011,11 +8012,11 @@ declare var Cache: {
|
||||
}
|
||||
|
||||
interface CacheStorage {
|
||||
delete(cacheName: string): PromiseLike<boolean>;
|
||||
has(cacheName: string): PromiseLike<boolean>;
|
||||
delete(cacheName: string): Promise<boolean>;
|
||||
has(cacheName: string): Promise<boolean>;
|
||||
keys(): any;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): PromiseLike<any>;
|
||||
open(cacheName: string): PromiseLike<Cache>;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): Promise<any>;
|
||||
open(cacheName: string): Promise<Cache>;
|
||||
}
|
||||
|
||||
declare var CacheStorage: {
|
||||
@@ -11636,7 +11637,7 @@ interface HTMLMediaElement extends HTMLElement {
|
||||
* Loads and starts playback of a media resource.
|
||||
*/
|
||||
play(): void;
|
||||
setMediaKeys(mediaKeys: MediaKeys | null): PromiseLike<void>;
|
||||
setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
|
||||
readonly HAVE_CURRENT_DATA: number;
|
||||
readonly HAVE_ENOUGH_DATA: number;
|
||||
readonly HAVE_FUTURE_DATA: number;
|
||||
@@ -13214,7 +13215,7 @@ interface MSApp {
|
||||
execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
|
||||
execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
|
||||
getCurrentPriority(): string;
|
||||
getHtmlPrintDocumentSourceAsync(htmlDoc: any): PromiseLike<any>;
|
||||
getHtmlPrintDocumentSourceAsync(htmlDoc: any): Promise<any>;
|
||||
getViewId(view: any): any;
|
||||
isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
|
||||
pageHandlesAllApplicationActivations(enabled: boolean): void;
|
||||
@@ -13275,8 +13276,8 @@ declare var MSBlobBuilder: {
|
||||
}
|
||||
|
||||
interface MSCredentials {
|
||||
getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): PromiseLike<MSAssertion>;
|
||||
makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): PromiseLike<MSAssertion>;
|
||||
getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): Promise<MSAssertion>;
|
||||
makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): Promise<MSAssertion>;
|
||||
}
|
||||
|
||||
declare var MSCredentials: {
|
||||
@@ -13664,7 +13665,7 @@ interface MediaDevices extends EventTarget {
|
||||
ondevicechange: (this: MediaDevices, ev: Event) => any;
|
||||
enumerateDevices(): any;
|
||||
getSupportedConstraints(): MediaTrackSupportedConstraints;
|
||||
getUserMedia(constraints: MediaStreamConstraints): PromiseLike<MediaStream>;
|
||||
getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
|
||||
addEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -13723,15 +13724,15 @@ declare var MediaKeyMessageEvent: {
|
||||
}
|
||||
|
||||
interface MediaKeySession extends EventTarget {
|
||||
readonly closed: PromiseLike<void>;
|
||||
readonly closed: Promise<void>;
|
||||
readonly expiration: number;
|
||||
readonly keyStatuses: MediaKeyStatusMap;
|
||||
readonly sessionId: string;
|
||||
close(): PromiseLike<void>;
|
||||
generateRequest(initDataType: string, initData: any): PromiseLike<void>;
|
||||
load(sessionId: string): PromiseLike<boolean>;
|
||||
remove(): PromiseLike<void>;
|
||||
update(response: any): PromiseLike<void>;
|
||||
close(): Promise<void>;
|
||||
generateRequest(initDataType: string, initData: any): Promise<void>;
|
||||
load(sessionId: string): Promise<boolean>;
|
||||
remove(): Promise<void>;
|
||||
update(response: any): Promise<void>;
|
||||
}
|
||||
|
||||
declare var MediaKeySession: {
|
||||
@@ -13753,7 +13754,7 @@ declare var MediaKeyStatusMap: {
|
||||
|
||||
interface MediaKeySystemAccess {
|
||||
readonly keySystem: string;
|
||||
createMediaKeys(): PromiseLike<MediaKeys>;
|
||||
createMediaKeys(): Promise<MediaKeys>;
|
||||
getConfiguration(): MediaKeySystemConfiguration;
|
||||
}
|
||||
|
||||
@@ -13764,7 +13765,7 @@ declare var MediaKeySystemAccess: {
|
||||
|
||||
interface MediaKeys {
|
||||
createSession(sessionType?: string): MediaKeySession;
|
||||
setServerCertificate(serverCertificate: any): PromiseLike<void>;
|
||||
setServerCertificate(serverCertificate: any): Promise<void>;
|
||||
}
|
||||
|
||||
declare var MediaKeys: {
|
||||
@@ -13903,7 +13904,7 @@ interface MediaStreamTrack extends EventTarget {
|
||||
readonly readonly: boolean;
|
||||
readonly readyState: string;
|
||||
readonly remote: boolean;
|
||||
applyConstraints(constraints: MediaTrackConstraints): PromiseLike<void>;
|
||||
applyConstraints(constraints: MediaTrackConstraints): Promise<void>;
|
||||
clone(): MediaStreamTrack;
|
||||
getCapabilities(): MediaTrackCapabilities;
|
||||
getConstraints(): MediaTrackConstraints;
|
||||
@@ -14137,7 +14138,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte
|
||||
getGamepads(): Gamepad[];
|
||||
javaEnabled(): boolean;
|
||||
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
|
||||
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): PromiseLike<MediaKeySystemAccess>;
|
||||
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise<MediaKeySystemAccess>;
|
||||
vibrate(pattern: number | number[]): boolean;
|
||||
}
|
||||
|
||||
@@ -14297,7 +14298,7 @@ interface Notification extends EventTarget {
|
||||
declare var Notification: {
|
||||
prototype: Notification;
|
||||
new(title: string, options?: NotificationOptions): Notification;
|
||||
requestPermission(callback?: NotificationPermissionCallback): PromiseLike<string>;
|
||||
requestPermission(callback?: NotificationPermissionCallback): Promise<string>;
|
||||
}
|
||||
|
||||
interface OES_element_index_uint {
|
||||
@@ -14368,8 +14369,8 @@ interface OfflineAudioContextEventMap extends AudioContextEventMap {
|
||||
interface OfflineAudioContext extends AudioContextBase {
|
||||
readonly length: number;
|
||||
oncomplete: (this: OfflineAudioContext, ev: OfflineAudioCompletionEvent) => any;
|
||||
startRendering(): PromiseLike<AudioBuffer>;
|
||||
suspend(suspendTime: number): PromiseLike<void>;
|
||||
startRendering(): Promise<AudioBuffer>;
|
||||
suspend(suspendTime: number): Promise<void>;
|
||||
addEventListener<K extends keyof OfflineAudioContextEventMap>(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -14484,8 +14485,8 @@ interface PaymentRequest extends EventTarget {
|
||||
readonly shippingAddress: PaymentAddress | null;
|
||||
readonly shippingOption: string | null;
|
||||
readonly shippingType: string | null;
|
||||
abort(): PromiseLike<void>;
|
||||
show(): PromiseLike<PaymentResponse>;
|
||||
abort(): Promise<void>;
|
||||
show(): Promise<PaymentResponse>;
|
||||
addEventListener<K extends keyof PaymentRequestEventMap>(type: K, listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -14496,7 +14497,7 @@ declare var PaymentRequest: {
|
||||
}
|
||||
|
||||
interface PaymentRequestUpdateEvent extends Event {
|
||||
updateWith(d: PromiseLike<PaymentDetails>): void;
|
||||
updateWith(d: Promise<PaymentDetails>): void;
|
||||
}
|
||||
|
||||
declare var PaymentRequestUpdateEvent: {
|
||||
@@ -14512,7 +14513,7 @@ interface PaymentResponse {
|
||||
readonly payerPhone: string | null;
|
||||
readonly shippingAddress: PaymentAddress | null;
|
||||
readonly shippingOption: string | null;
|
||||
complete(result?: string): PromiseLike<void>;
|
||||
complete(result?: string): Promise<void>;
|
||||
toJSON(): any;
|
||||
}
|
||||
|
||||
@@ -14838,9 +14839,9 @@ declare var ProgressEvent: {
|
||||
}
|
||||
|
||||
interface PushManager {
|
||||
getSubscription(): PromiseLike<PushSubscription>;
|
||||
permissionState(options?: PushSubscriptionOptionsInit): PromiseLike<string>;
|
||||
subscribe(options?: PushSubscriptionOptionsInit): PromiseLike<PushSubscription>;
|
||||
getSubscription(): Promise<PushSubscription>;
|
||||
permissionState(options?: PushSubscriptionOptionsInit): Promise<string>;
|
||||
subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
|
||||
}
|
||||
|
||||
declare var PushManager: {
|
||||
@@ -14853,7 +14854,7 @@ interface PushSubscription {
|
||||
readonly options: PushSubscriptionOptions;
|
||||
getKey(name: string): ArrayBuffer | null;
|
||||
toJSON(): any;
|
||||
unsubscribe(): PromiseLike<boolean>;
|
||||
unsubscribe(): Promise<boolean>;
|
||||
}
|
||||
|
||||
declare var PushSubscription: {
|
||||
@@ -15047,19 +15048,19 @@ interface RTCPeerConnection extends EventTarget {
|
||||
onsignalingstatechange: (this: RTCPeerConnection, ev: Event) => any;
|
||||
readonly remoteDescription: RTCSessionDescription | null;
|
||||
readonly signalingState: string;
|
||||
addIceCandidate(candidate: RTCIceCandidate, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<void>;
|
||||
addIceCandidate(candidate: RTCIceCandidate, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
addStream(stream: MediaStream): void;
|
||||
close(): void;
|
||||
createAnswer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<RTCSessionDescription>;
|
||||
createOffer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback, options?: RTCOfferOptions): PromiseLike<RTCSessionDescription>;
|
||||
createAnswer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback): Promise<RTCSessionDescription>;
|
||||
createOffer(successCallback?: RTCSessionDescriptionCallback, failureCallback?: RTCPeerConnectionErrorCallback, options?: RTCOfferOptions): Promise<RTCSessionDescription>;
|
||||
getConfiguration(): RTCConfiguration;
|
||||
getLocalStreams(): MediaStream[];
|
||||
getRemoteStreams(): MediaStream[];
|
||||
getStats(selector: MediaStreamTrack | null, successCallback?: RTCStatsCallback, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<RTCStatsReport>;
|
||||
getStats(selector: MediaStreamTrack | null, successCallback?: RTCStatsCallback, failureCallback?: RTCPeerConnectionErrorCallback): Promise<RTCStatsReport>;
|
||||
getStreamById(streamId: string): MediaStream | null;
|
||||
removeStream(stream: MediaStream): void;
|
||||
setLocalDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<void>;
|
||||
setRemoteDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): PromiseLike<void>;
|
||||
setLocalDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
setRemoteDescription(description: RTCSessionDescription, successCallback?: VoidFunction, failureCallback?: RTCPeerConnectionErrorCallback): Promise<void>;
|
||||
addEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -15165,8 +15166,8 @@ declare var RTCSsrcConflictEvent: {
|
||||
}
|
||||
|
||||
interface RTCStatsProvider extends EventTarget {
|
||||
getStats(): PromiseLike<RTCStatsReport>;
|
||||
msGetStats(): PromiseLike<RTCStatsReport>;
|
||||
getStats(): Promise<RTCStatsReport>;
|
||||
msGetStats(): Promise<RTCStatsReport>;
|
||||
}
|
||||
|
||||
declare var RTCStatsProvider: {
|
||||
@@ -15220,7 +15221,7 @@ declare var Range: {
|
||||
|
||||
interface ReadableStream {
|
||||
readonly locked: boolean;
|
||||
cancel(): PromiseLike<void>;
|
||||
cancel(): Promise<void>;
|
||||
getReader(): ReadableStreamReader;
|
||||
}
|
||||
|
||||
@@ -15230,8 +15231,8 @@ declare var ReadableStream: {
|
||||
}
|
||||
|
||||
interface ReadableStreamReader {
|
||||
cancel(): PromiseLike<void>;
|
||||
read(): PromiseLike<any>;
|
||||
cancel(): Promise<void>;
|
||||
read(): Promise<any>;
|
||||
releaseLock(): void;
|
||||
}
|
||||
|
||||
@@ -17205,10 +17206,10 @@ interface ServiceWorkerContainer extends EventTarget {
|
||||
readonly controller: ServiceWorker | null;
|
||||
oncontrollerchange: (this: ServiceWorkerContainer, ev: Event) => any;
|
||||
onmessage: (this: ServiceWorkerContainer, ev: ServiceWorkerMessageEvent) => any;
|
||||
readonly ready: PromiseLike<ServiceWorkerRegistration>;
|
||||
getRegistration(clientURL?: USVString): PromiseLike<any>;
|
||||
readonly ready: Promise<ServiceWorkerRegistration>;
|
||||
getRegistration(clientURL?: USVString): Promise<any>;
|
||||
getRegistrations(): any;
|
||||
register(scriptURL: USVString, options?: RegistrationOptions): PromiseLike<ServiceWorkerRegistration>;
|
||||
register(scriptURL: USVString, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
|
||||
addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -17244,9 +17245,9 @@ interface ServiceWorkerRegistration extends EventTarget {
|
||||
readonly sync: SyncManager;
|
||||
readonly waiting: ServiceWorker | null;
|
||||
getNotifications(filter?: GetNotificationOptions): any;
|
||||
showNotification(title: string, options?: NotificationOptions): PromiseLike<void>;
|
||||
unregister(): PromiseLike<boolean>;
|
||||
update(): PromiseLike<void>;
|
||||
showNotification(title: string, options?: NotificationOptions): Promise<void>;
|
||||
unregister(): Promise<boolean>;
|
||||
update(): Promise<void>;
|
||||
addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -17481,7 +17482,7 @@ declare var SubtleCrypto: {
|
||||
|
||||
interface SyncManager {
|
||||
getTags(): any;
|
||||
register(tag: string): PromiseLike<void>;
|
||||
register(tag: string): Promise<void>;
|
||||
}
|
||||
|
||||
declare var SyncManager: {
|
||||
@@ -17895,8 +17896,8 @@ declare var WaveShaperNode: {
|
||||
}
|
||||
|
||||
interface WebAuthentication {
|
||||
getAssertion(assertionChallenge: any, options?: AssertionOptions): PromiseLike<WebAuthnAssertion>;
|
||||
makeCredential(accountInformation: Account, cryptoParameters: ScopedCredentialParameters[], attestationChallenge: any, options?: ScopedCredentialOptions): PromiseLike<ScopedCredentialInfo>;
|
||||
getAssertion(assertionChallenge: any, options?: AssertionOptions): Promise<WebAuthnAssertion>;
|
||||
makeCredential(accountInformation: Account, cryptoParameters: ScopedCredentialParameters[], attestationChallenge: any, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
|
||||
}
|
||||
|
||||
declare var WebAuthentication: {
|
||||
@@ -19389,10 +19390,10 @@ interface AbstractWorker {
|
||||
|
||||
interface Body {
|
||||
readonly bodyUsed: boolean;
|
||||
arrayBuffer(): PromiseLike<ArrayBuffer>;
|
||||
blob(): PromiseLike<Blob>;
|
||||
json(): PromiseLike<any>;
|
||||
text(): PromiseLike<string>;
|
||||
arrayBuffer(): Promise<ArrayBuffer>;
|
||||
blob(): Promise<Blob>;
|
||||
json(): Promise<any>;
|
||||
text(): Promise<string>;
|
||||
}
|
||||
|
||||
interface CanvasPathMethods {
|
||||
@@ -19533,7 +19534,7 @@ interface GlobalEventHandlers {
|
||||
}
|
||||
|
||||
interface GlobalFetch {
|
||||
fetch(input: RequestInfo, init?: RequestInit): PromiseLike<Response>;
|
||||
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
||||
}
|
||||
|
||||
interface HTMLTableAlignment {
|
||||
@@ -20790,7 +20791,7 @@ declare var onwheel: (this: Window, ev: WheelEvent) => any;
|
||||
declare var indexedDB: IDBFactory;
|
||||
declare function atob(encodedString: string): string;
|
||||
declare function btoa(rawString: string): string;
|
||||
declare function fetch(input: RequestInfo, init?: RequestInit): PromiseLike<Response>;
|
||||
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
||||
declare function addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, useCapture?: boolean): void;
|
||||
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
type AAGUID = string;
|
||||
|
||||
Vendored
+35
-35
@@ -188,13 +188,13 @@ declare var Blob: {
|
||||
}
|
||||
|
||||
interface Cache {
|
||||
add(request: RequestInfo): PromiseLike<void>;
|
||||
addAll(requests: RequestInfo[]): PromiseLike<void>;
|
||||
delete(request: RequestInfo, options?: CacheQueryOptions): PromiseLike<boolean>;
|
||||
add(request: RequestInfo): Promise<void>;
|
||||
addAll(requests: RequestInfo[]): Promise<void>;
|
||||
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
||||
keys(request?: RequestInfo, options?: CacheQueryOptions): any;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): PromiseLike<Response>;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response>;
|
||||
matchAll(request?: RequestInfo, options?: CacheQueryOptions): any;
|
||||
put(request: RequestInfo, response: Response): PromiseLike<void>;
|
||||
put(request: RequestInfo, response: Response): Promise<void>;
|
||||
}
|
||||
|
||||
declare var Cache: {
|
||||
@@ -203,11 +203,11 @@ declare var Cache: {
|
||||
}
|
||||
|
||||
interface CacheStorage {
|
||||
delete(cacheName: string): PromiseLike<boolean>;
|
||||
has(cacheName: string): PromiseLike<boolean>;
|
||||
delete(cacheName: string): Promise<boolean>;
|
||||
has(cacheName: string): Promise<boolean>;
|
||||
keys(): any;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): PromiseLike<any>;
|
||||
open(cacheName: string): PromiseLike<Cache>;
|
||||
match(request: RequestInfo, options?: CacheQueryOptions): Promise<any>;
|
||||
open(cacheName: string): Promise<Cache>;
|
||||
}
|
||||
|
||||
declare var CacheStorage: {
|
||||
@@ -766,7 +766,7 @@ interface Notification extends EventTarget {
|
||||
declare var Notification: {
|
||||
prototype: Notification;
|
||||
new(title: string, options?: NotificationOptions): Notification;
|
||||
requestPermission(callback?: NotificationPermissionCallback): PromiseLike<string>;
|
||||
requestPermission(callback?: NotificationPermissionCallback): Promise<string>;
|
||||
}
|
||||
|
||||
interface Performance {
|
||||
@@ -882,9 +882,9 @@ declare var ProgressEvent: {
|
||||
}
|
||||
|
||||
interface PushManager {
|
||||
getSubscription(): PromiseLike<PushSubscription>;
|
||||
permissionState(options?: PushSubscriptionOptionsInit): PromiseLike<string>;
|
||||
subscribe(options?: PushSubscriptionOptionsInit): PromiseLike<PushSubscription>;
|
||||
getSubscription(): Promise<PushSubscription>;
|
||||
permissionState(options?: PushSubscriptionOptionsInit): Promise<string>;
|
||||
subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
|
||||
}
|
||||
|
||||
declare var PushManager: {
|
||||
@@ -897,7 +897,7 @@ interface PushSubscription {
|
||||
readonly options: PushSubscriptionOptions;
|
||||
getKey(name: string): ArrayBuffer | null;
|
||||
toJSON(): any;
|
||||
unsubscribe(): PromiseLike<boolean>;
|
||||
unsubscribe(): Promise<boolean>;
|
||||
}
|
||||
|
||||
declare var PushSubscription: {
|
||||
@@ -917,7 +917,7 @@ declare var PushSubscriptionOptions: {
|
||||
|
||||
interface ReadableStream {
|
||||
readonly locked: boolean;
|
||||
cancel(): PromiseLike<void>;
|
||||
cancel(): Promise<void>;
|
||||
getReader(): ReadableStreamReader;
|
||||
}
|
||||
|
||||
@@ -927,8 +927,8 @@ declare var ReadableStream: {
|
||||
}
|
||||
|
||||
interface ReadableStreamReader {
|
||||
cancel(): PromiseLike<void>;
|
||||
read(): PromiseLike<any>;
|
||||
cancel(): Promise<void>;
|
||||
read(): Promise<any>;
|
||||
releaseLock(): void;
|
||||
}
|
||||
|
||||
@@ -1006,9 +1006,9 @@ interface ServiceWorkerRegistration extends EventTarget {
|
||||
readonly sync: SyncManager;
|
||||
readonly waiting: ServiceWorker | null;
|
||||
getNotifications(filter?: GetNotificationOptions): any;
|
||||
showNotification(title: string, options?: NotificationOptions): PromiseLike<void>;
|
||||
unregister(): PromiseLike<boolean>;
|
||||
update(): PromiseLike<void>;
|
||||
showNotification(title: string, options?: NotificationOptions): Promise<void>;
|
||||
unregister(): Promise<boolean>;
|
||||
update(): Promise<void>;
|
||||
addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -1020,7 +1020,7 @@ declare var ServiceWorkerRegistration: {
|
||||
|
||||
interface SyncManager {
|
||||
getTags(): any;
|
||||
register(tag: string): PromiseLike<void>;
|
||||
register(tag: string): Promise<void>;
|
||||
}
|
||||
|
||||
declare var SyncManager: {
|
||||
@@ -1150,14 +1150,14 @@ interface AbstractWorker {
|
||||
|
||||
interface Body {
|
||||
readonly bodyUsed: boolean;
|
||||
arrayBuffer(): PromiseLike<ArrayBuffer>;
|
||||
blob(): PromiseLike<Blob>;
|
||||
json(): PromiseLike<any>;
|
||||
text(): PromiseLike<string>;
|
||||
arrayBuffer(): Promise<ArrayBuffer>;
|
||||
blob(): Promise<Blob>;
|
||||
json(): Promise<any>;
|
||||
text(): Promise<string>;
|
||||
}
|
||||
|
||||
interface GlobalFetch {
|
||||
fetch(input: RequestInfo, init?: RequestInit): PromiseLike<Response>;
|
||||
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
||||
}
|
||||
|
||||
interface MSBaseReaderEventMap {
|
||||
@@ -1254,10 +1254,10 @@ declare var Client: {
|
||||
}
|
||||
|
||||
interface Clients {
|
||||
claim(): PromiseLike<void>;
|
||||
get(id: string): PromiseLike<any>;
|
||||
claim(): Promise<void>;
|
||||
get(id: string): Promise<any>;
|
||||
matchAll(options?: ClientQueryOptions): any;
|
||||
openWindow(url: USVString): PromiseLike<WindowClient>;
|
||||
openWindow(url: USVString): Promise<WindowClient>;
|
||||
}
|
||||
|
||||
declare var Clients: {
|
||||
@@ -1283,7 +1283,7 @@ declare var DedicatedWorkerGlobalScope: {
|
||||
}
|
||||
|
||||
interface ExtendableEvent extends Event {
|
||||
waitUntil(f: PromiseLike<any>): void;
|
||||
waitUntil(f: Promise<any>): void;
|
||||
}
|
||||
|
||||
declare var ExtendableEvent: {
|
||||
@@ -1308,7 +1308,7 @@ interface FetchEvent extends ExtendableEvent {
|
||||
readonly clientId: string | null;
|
||||
readonly isReload: boolean;
|
||||
readonly request: Request;
|
||||
respondWith(r: PromiseLike<Response>): void;
|
||||
respondWith(r: Promise<Response>): void;
|
||||
}
|
||||
|
||||
declare var FetchEvent: {
|
||||
@@ -1383,7 +1383,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
||||
onpushsubscriptionchange: (this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any;
|
||||
onsync: (this: ServiceWorkerGlobalScope, ev: SyncEvent) => any;
|
||||
readonly registration: ServiceWorkerRegistration;
|
||||
skipWaiting(): PromiseLike<void>;
|
||||
skipWaiting(): Promise<void>;
|
||||
addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, useCapture?: boolean): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
}
|
||||
@@ -1406,8 +1406,8 @@ declare var SyncEvent: {
|
||||
interface WindowClient extends Client {
|
||||
readonly focused: boolean;
|
||||
readonly visibilityState: string;
|
||||
focus(): PromiseLike<WindowClient>;
|
||||
navigate(url: USVString): PromiseLike<WindowClient>;
|
||||
focus(): Promise<WindowClient>;
|
||||
navigate(url: USVString): Promise<WindowClient>;
|
||||
}
|
||||
|
||||
declare var WindowClient: {
|
||||
@@ -1735,7 +1735,7 @@ declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number
|
||||
declare function atob(encodedString: string): string;
|
||||
declare function btoa(rawString: string): string;
|
||||
declare var console: Console;
|
||||
declare function fetch(input: RequestInfo, init?: RequestInit): PromiseLike<Response>;
|
||||
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
||||
declare function dispatchEvent(evt: Event): boolean;
|
||||
declare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
|
||||
declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, useCapture?: boolean): void;
|
||||
|
||||
+22
-3
@@ -3025,6 +3025,7 @@ var ts;
|
||||
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
|
||||
The_operand_of_a_delete_operator_must_be_a_property_reference: { code: 2703, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", message: "The operand of a delete operator must be a property reference" },
|
||||
The_operand_of_a_delete_operator_cannot_be_a_read_only_property: { code: 2704, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", message: "The operand of a delete operator cannot be a read-only property" },
|
||||
An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: { code: 2705, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", message: "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
|
||||
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
|
||||
@@ -31214,6 +31215,9 @@ var ts;
|
||||
error(func, ts.Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option);
|
||||
return unknownType;
|
||||
}
|
||||
else if (!getGlobalPromiseConstructorSymbol()) {
|
||||
error(func, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
|
||||
}
|
||||
return promiseType;
|
||||
}
|
||||
function getReturnTypeFromBody(func, contextualMapper) {
|
||||
@@ -32485,6 +32489,9 @@ var ts;
|
||||
case 148:
|
||||
addName(names, member.name, memberName, 3);
|
||||
break;
|
||||
case 150:
|
||||
addName(names, member.name, memberName, 4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32492,7 +32499,12 @@ var ts;
|
||||
function addName(names, location, name, meaning) {
|
||||
var prev = names.get(name);
|
||||
if (prev) {
|
||||
if (prev & meaning) {
|
||||
if (prev & 4) {
|
||||
if (meaning !== 4) {
|
||||
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
|
||||
}
|
||||
}
|
||||
else if (prev & meaning) {
|
||||
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
|
||||
}
|
||||
else {
|
||||
@@ -33178,7 +33190,12 @@ var ts;
|
||||
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455, true);
|
||||
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
|
||||
if (promiseConstructorType === unknownType) {
|
||||
error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
|
||||
if (promiseConstructorName.kind === 70 && promiseConstructorName.text === "Promise" && getTargetType(returnType) === tryGetGlobalPromiseType()) {
|
||||
error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
|
||||
}
|
||||
else {
|
||||
error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
|
||||
}
|
||||
return unknownType;
|
||||
}
|
||||
var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType();
|
||||
@@ -35105,7 +35122,9 @@ var ts;
|
||||
if (node.exportClause) {
|
||||
ts.forEach(node.exportClause.elements, checkExportSpecifier);
|
||||
var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent);
|
||||
if (node.parent.kind !== 263 && !inAmbientExternalModule) {
|
||||
var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 &&
|
||||
!node.moduleSpecifier && ts.isInAmbientContext(node);
|
||||
if (node.parent.kind !== 263 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
|
||||
error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
|
||||
}
|
||||
}
|
||||
|
||||
+23
-4
@@ -3035,6 +3035,7 @@ var ts;
|
||||
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
|
||||
The_operand_of_a_delete_operator_must_be_a_property_reference: { code: 2703, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", message: "The operand of a delete operator must be a property reference" },
|
||||
The_operand_of_a_delete_operator_cannot_be_a_read_only_property: { code: 2704, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", message: "The operand of a delete operator cannot be a read-only property" },
|
||||
An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: { code: 2705, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", message: "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
|
||||
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
|
||||
@@ -31224,6 +31225,9 @@ var ts;
|
||||
error(func, ts.Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option);
|
||||
return unknownType;
|
||||
}
|
||||
else if (!getGlobalPromiseConstructorSymbol()) {
|
||||
error(func, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
|
||||
}
|
||||
return promiseType;
|
||||
}
|
||||
function getReturnTypeFromBody(func, contextualMapper) {
|
||||
@@ -32495,6 +32499,9 @@ var ts;
|
||||
case 148:
|
||||
addName(names, member.name, memberName, 3);
|
||||
break;
|
||||
case 150:
|
||||
addName(names, member.name, memberName, 4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32502,7 +32509,12 @@ var ts;
|
||||
function addName(names, location, name, meaning) {
|
||||
var prev = names.get(name);
|
||||
if (prev) {
|
||||
if (prev & meaning) {
|
||||
if (prev & 4) {
|
||||
if (meaning !== 4) {
|
||||
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
|
||||
}
|
||||
}
|
||||
else if (prev & meaning) {
|
||||
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
|
||||
}
|
||||
else {
|
||||
@@ -33188,7 +33200,12 @@ var ts;
|
||||
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455, true);
|
||||
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
|
||||
if (promiseConstructorType === unknownType) {
|
||||
error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
|
||||
if (promiseConstructorName.kind === 70 && promiseConstructorName.text === "Promise" && getTargetType(returnType) === tryGetGlobalPromiseType()) {
|
||||
error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
|
||||
}
|
||||
else {
|
||||
error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
|
||||
}
|
||||
return unknownType;
|
||||
}
|
||||
var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType();
|
||||
@@ -35115,7 +35132,9 @@ var ts;
|
||||
if (node.exportClause) {
|
||||
ts.forEach(node.exportClause.elements, checkExportSpecifier);
|
||||
var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent);
|
||||
if (node.parent.kind !== 263 && !inAmbientExternalModule) {
|
||||
var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 &&
|
||||
!node.moduleSpecifier && ts.isInAmbientContext(node);
|
||||
if (node.parent.kind !== 263 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
|
||||
error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
|
||||
}
|
||||
}
|
||||
@@ -66217,7 +66236,7 @@ var ts;
|
||||
var span = { start: start, length: end - start };
|
||||
var newLineChar = ts.getNewLineOrDefaultFromHost(host);
|
||||
var allFixes = [];
|
||||
ts.forEach(errorCodes, function (error) {
|
||||
ts.forEach(ts.deduplicate(errorCodes), function (error) {
|
||||
cancellationToken.throwIfCancellationRequested();
|
||||
var context = {
|
||||
errorCode: error,
|
||||
|
||||
+23
-4
@@ -3035,6 +3035,7 @@ var ts;
|
||||
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
|
||||
The_operand_of_a_delete_operator_must_be_a_property_reference: { code: 2703, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", message: "The operand of a delete operator must be a property reference" },
|
||||
The_operand_of_a_delete_operator_cannot_be_a_read_only_property: { code: 2704, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", message: "The operand of a delete operator cannot be a read-only property" },
|
||||
An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: { code: 2705, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", message: "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
|
||||
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
|
||||
@@ -32348,6 +32349,9 @@ var ts;
|
||||
error(func, ts.Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option);
|
||||
return unknownType;
|
||||
}
|
||||
else if (!getGlobalPromiseConstructorSymbol()) {
|
||||
error(func, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
|
||||
}
|
||||
return promiseType;
|
||||
}
|
||||
function getReturnTypeFromBody(func, contextualMapper) {
|
||||
@@ -33619,6 +33623,9 @@ var ts;
|
||||
case 148:
|
||||
addName(names, member.name, memberName, 3);
|
||||
break;
|
||||
case 150:
|
||||
addName(names, member.name, memberName, 4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33626,7 +33633,12 @@ var ts;
|
||||
function addName(names, location, name, meaning) {
|
||||
var prev = names.get(name);
|
||||
if (prev) {
|
||||
if (prev & meaning) {
|
||||
if (prev & 4) {
|
||||
if (meaning !== 4) {
|
||||
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
|
||||
}
|
||||
}
|
||||
else if (prev & meaning) {
|
||||
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
|
||||
}
|
||||
else {
|
||||
@@ -34312,7 +34324,12 @@ var ts;
|
||||
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455, true);
|
||||
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
|
||||
if (promiseConstructorType === unknownType) {
|
||||
error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
|
||||
if (promiseConstructorName.kind === 70 && promiseConstructorName.text === "Promise" && getTargetType(returnType) === tryGetGlobalPromiseType()) {
|
||||
error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
|
||||
}
|
||||
else {
|
||||
error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
|
||||
}
|
||||
return unknownType;
|
||||
}
|
||||
var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType();
|
||||
@@ -36239,7 +36256,9 @@ var ts;
|
||||
if (node.exportClause) {
|
||||
ts.forEach(node.exportClause.elements, checkExportSpecifier);
|
||||
var inAmbientExternalModule = node.parent.kind === 233 && ts.isAmbientModule(node.parent.parent);
|
||||
if (node.parent.kind !== 263 && !inAmbientExternalModule) {
|
||||
var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 &&
|
||||
!node.moduleSpecifier && ts.isInAmbientContext(node);
|
||||
if (node.parent.kind !== 263 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
|
||||
error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
|
||||
}
|
||||
}
|
||||
@@ -66217,7 +66236,7 @@ var ts;
|
||||
var span = { start: start, length: end - start };
|
||||
var newLineChar = ts.getNewLineOrDefaultFromHost(host);
|
||||
var allFixes = [];
|
||||
ts.forEach(errorCodes, function (error) {
|
||||
ts.forEach(ts.deduplicate(errorCodes), function (error) {
|
||||
cancellationToken.throwIfCancellationRequested();
|
||||
var context = {
|
||||
errorCode: error,
|
||||
|
||||
+30
-10
@@ -4471,6 +4471,7 @@ var ts;
|
||||
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
|
||||
The_operand_of_a_delete_operator_must_be_a_property_reference: { code: 2703, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", message: "The operand of a delete operator must be a property reference" },
|
||||
The_operand_of_a_delete_operator_cannot_be_a_read_only_property: { code: 2704, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", message: "The operand of a delete operator cannot be a read-only property" },
|
||||
An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: { code: 2705, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", message: "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
|
||||
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
|
||||
@@ -37815,6 +37816,9 @@ var ts;
|
||||
error(func, ts.Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option);
|
||||
return unknownType;
|
||||
}
|
||||
else if (!getGlobalPromiseConstructorSymbol()) {
|
||||
error(func, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
|
||||
}
|
||||
return promiseType;
|
||||
}
|
||||
function getReturnTypeFromBody(func, contextualMapper) {
|
||||
@@ -39239,12 +39243,13 @@ var ts;
|
||||
}
|
||||
}
|
||||
function checkClassForDuplicateDeclarations(node) {
|
||||
var Accessor;
|
||||
(function (Accessor) {
|
||||
Accessor[Accessor["Getter"] = 1] = "Getter";
|
||||
Accessor[Accessor["Setter"] = 2] = "Setter";
|
||||
Accessor[Accessor["Property"] = 3] = "Property";
|
||||
})(Accessor || (Accessor = {}));
|
||||
var Declaration;
|
||||
(function (Declaration) {
|
||||
Declaration[Declaration["Getter"] = 1] = "Getter";
|
||||
Declaration[Declaration["Setter"] = 2] = "Setter";
|
||||
Declaration[Declaration["Method"] = 4] = "Method";
|
||||
Declaration[Declaration["Property"] = 3] = "Property";
|
||||
})(Declaration || (Declaration = {}));
|
||||
var instanceNames = ts.createMap();
|
||||
var staticNames = ts.createMap();
|
||||
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
||||
@@ -39272,6 +39277,9 @@ var ts;
|
||||
case 148 /* PropertyDeclaration */:
|
||||
addName(names, member.name, memberName, 3 /* Property */);
|
||||
break;
|
||||
case 150 /* MethodDeclaration */:
|
||||
addName(names, member.name, memberName, 4 /* Method */);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39279,7 +39287,12 @@ var ts;
|
||||
function addName(names, location, name, meaning) {
|
||||
var prev = names.get(name);
|
||||
if (prev) {
|
||||
if (prev & meaning) {
|
||||
if (prev & 4 /* Method */) {
|
||||
if (meaning !== 4 /* Method */) {
|
||||
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
|
||||
}
|
||||
}
|
||||
else if (prev & meaning) {
|
||||
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
|
||||
}
|
||||
else {
|
||||
@@ -40161,7 +40174,12 @@ var ts;
|
||||
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455 /* Value */, /*ignoreErrors*/ true);
|
||||
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
|
||||
if (promiseConstructorType === unknownType) {
|
||||
error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
|
||||
if (promiseConstructorName.kind === 70 /* Identifier */ && promiseConstructorName.text === "Promise" && getTargetType(returnType) === tryGetGlobalPromiseType()) {
|
||||
error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
|
||||
}
|
||||
else {
|
||||
error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
|
||||
}
|
||||
return unknownType;
|
||||
}
|
||||
var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType();
|
||||
@@ -42447,7 +42465,9 @@ var ts;
|
||||
// export { x, y } from "foo"
|
||||
ts.forEach(node.exportClause.elements, checkExportSpecifier);
|
||||
var inAmbientExternalModule = node.parent.kind === 233 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent);
|
||||
if (node.parent.kind !== 263 /* SourceFile */ && !inAmbientExternalModule) {
|
||||
var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 /* ModuleBlock */ &&
|
||||
!node.moduleSpecifier && ts.isInAmbientContext(node);
|
||||
if (node.parent.kind !== 263 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
|
||||
error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
|
||||
}
|
||||
}
|
||||
@@ -81490,7 +81510,7 @@ var ts;
|
||||
var span = { start: start, length: end - start };
|
||||
var newLineChar = ts.getNewLineOrDefaultFromHost(host);
|
||||
var allFixes = [];
|
||||
ts.forEach(errorCodes, function (error) {
|
||||
ts.forEach(ts.deduplicate(errorCodes), function (error) {
|
||||
cancellationToken.throwIfCancellationRequested();
|
||||
var context = {
|
||||
errorCode: error,
|
||||
|
||||
+30
-10
@@ -4471,6 +4471,7 @@ var ts;
|
||||
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
|
||||
The_operand_of_a_delete_operator_must_be_a_property_reference: { code: 2703, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", message: "The operand of a delete operator must be a property reference" },
|
||||
The_operand_of_a_delete_operator_cannot_be_a_read_only_property: { code: 2704, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", message: "The operand of a delete operator cannot be a read-only property" },
|
||||
An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: { code: 2705, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", message: "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
|
||||
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
|
||||
@@ -37815,6 +37816,9 @@ var ts;
|
||||
error(func, ts.Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option);
|
||||
return unknownType;
|
||||
}
|
||||
else if (!getGlobalPromiseConstructorSymbol()) {
|
||||
error(func, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
|
||||
}
|
||||
return promiseType;
|
||||
}
|
||||
function getReturnTypeFromBody(func, contextualMapper) {
|
||||
@@ -39239,12 +39243,13 @@ var ts;
|
||||
}
|
||||
}
|
||||
function checkClassForDuplicateDeclarations(node) {
|
||||
var Accessor;
|
||||
(function (Accessor) {
|
||||
Accessor[Accessor["Getter"] = 1] = "Getter";
|
||||
Accessor[Accessor["Setter"] = 2] = "Setter";
|
||||
Accessor[Accessor["Property"] = 3] = "Property";
|
||||
})(Accessor || (Accessor = {}));
|
||||
var Declaration;
|
||||
(function (Declaration) {
|
||||
Declaration[Declaration["Getter"] = 1] = "Getter";
|
||||
Declaration[Declaration["Setter"] = 2] = "Setter";
|
||||
Declaration[Declaration["Method"] = 4] = "Method";
|
||||
Declaration[Declaration["Property"] = 3] = "Property";
|
||||
})(Declaration || (Declaration = {}));
|
||||
var instanceNames = ts.createMap();
|
||||
var staticNames = ts.createMap();
|
||||
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
||||
@@ -39272,6 +39277,9 @@ var ts;
|
||||
case 148 /* PropertyDeclaration */:
|
||||
addName(names, member.name, memberName, 3 /* Property */);
|
||||
break;
|
||||
case 150 /* MethodDeclaration */:
|
||||
addName(names, member.name, memberName, 4 /* Method */);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39279,7 +39287,12 @@ var ts;
|
||||
function addName(names, location, name, meaning) {
|
||||
var prev = names.get(name);
|
||||
if (prev) {
|
||||
if (prev & meaning) {
|
||||
if (prev & 4 /* Method */) {
|
||||
if (meaning !== 4 /* Method */) {
|
||||
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
|
||||
}
|
||||
}
|
||||
else if (prev & meaning) {
|
||||
error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
|
||||
}
|
||||
else {
|
||||
@@ -40161,7 +40174,12 @@ var ts;
|
||||
var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 107455 /* Value */, /*ignoreErrors*/ true);
|
||||
var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType;
|
||||
if (promiseConstructorType === unknownType) {
|
||||
error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
|
||||
if (promiseConstructorName.kind === 70 /* Identifier */ && promiseConstructorName.text === "Promise" && getTargetType(returnType) === tryGetGlobalPromiseType()) {
|
||||
error(node.type, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
|
||||
}
|
||||
else {
|
||||
error(node.type, ts.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, ts.entityNameToString(promiseConstructorName));
|
||||
}
|
||||
return unknownType;
|
||||
}
|
||||
var globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType();
|
||||
@@ -42447,7 +42465,9 @@ var ts;
|
||||
// export { x, y } from "foo"
|
||||
ts.forEach(node.exportClause.elements, checkExportSpecifier);
|
||||
var inAmbientExternalModule = node.parent.kind === 233 /* ModuleBlock */ && ts.isAmbientModule(node.parent.parent);
|
||||
if (node.parent.kind !== 263 /* SourceFile */ && !inAmbientExternalModule) {
|
||||
var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 233 /* ModuleBlock */ &&
|
||||
!node.moduleSpecifier && ts.isInAmbientContext(node);
|
||||
if (node.parent.kind !== 263 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
|
||||
error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
|
||||
}
|
||||
}
|
||||
@@ -81490,7 +81510,7 @@ var ts;
|
||||
var span = { start: start, length: end - start };
|
||||
var newLineChar = ts.getNewLineOrDefaultFromHost(host);
|
||||
var allFixes = [];
|
||||
ts.forEach(errorCodes, function (error) {
|
||||
ts.forEach(ts.deduplicate(errorCodes), function (error) {
|
||||
cancellationToken.throwIfCancellationRequested();
|
||||
var context = {
|
||||
errorCode: error,
|
||||
|
||||
@@ -3035,6 +3035,7 @@ var ts;
|
||||
_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: { code: 2702, category: ts.DiagnosticCategory.Error, key: "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", message: "'{0}' only refers to a type, but is being used as a namespace here." },
|
||||
The_operand_of_a_delete_operator_must_be_a_property_reference: { code: 2703, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", message: "The operand of a delete operator must be a property reference" },
|
||||
The_operand_of_a_delete_operator_cannot_be_a_read_only_property: { code: 2704, category: ts.DiagnosticCategory.Error, key: "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", message: "The operand of a delete operator cannot be a read-only property" },
|
||||
An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: { code: 2705, category: ts.DiagnosticCategory.Error, key: "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", message: "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option." },
|
||||
Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import_declaration_0_is_using_private_name_1_4000", message: "Import declaration '{0}' is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", message: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
|
||||
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", message: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },
|
||||
|
||||
Reference in New Issue
Block a user