2016-12-15 07:03:00 +01:00
|
|
|
/*! *****************************************************************************
|
|
|
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
|
|
this file except in compliance with the License. You may obtain a copy of the
|
|
|
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
|
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
|
|
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
|
|
|
|
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
|
|
and limitations under the License.
|
|
|
|
***************************************************************************** */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <reference no-default-lib="true"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////
|
2017-08-01 00:54:41 +02:00
|
|
|
/// Worker APIs
|
2016-12-15 07:03:00 +01:00
|
|
|
/////////////////////////////
|
|
|
|
|
|
|
|
interface Algorithm {
|
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface CacheQueryOptions {
|
2017-08-01 00:54:41 +02:00
|
|
|
cacheName?: string;
|
2017-02-15 23:44:31 +01:00
|
|
|
ignoreMethod?: boolean;
|
2017-08-01 00:54:41 +02:00
|
|
|
ignoreSearch?: boolean;
|
2017-02-15 23:44:31 +01:00
|
|
|
ignoreVary?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface CloseEventInit extends EventInit {
|
|
|
|
code?: number;
|
|
|
|
reason?: string;
|
2017-08-01 00:54:41 +02:00
|
|
|
wasClean?: boolean;
|
2017-02-15 23:44:31 +01:00
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface EventInit {
|
2016-12-15 22:46:39 +01:00
|
|
|
scoped?: boolean;
|
2016-12-15 07:03:00 +01:00
|
|
|
bubbles?: boolean;
|
|
|
|
cancelable?: boolean;
|
|
|
|
}
|
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface GetNotificationOptions {
|
|
|
|
tag?: string;
|
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface IDBIndexParameters {
|
|
|
|
multiEntry?: boolean;
|
|
|
|
unique?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IDBObjectStoreParameters {
|
|
|
|
autoIncrement?: boolean;
|
2017-12-02 20:16:59 +01:00
|
|
|
keyPath?: string | string[];
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
interface KeyAlgorithm {
|
|
|
|
name?: string;
|
|
|
|
}
|
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface MessageEventInit extends EventInit {
|
|
|
|
lastEventId?: string;
|
|
|
|
channel?: string;
|
|
|
|
data?: any;
|
|
|
|
origin?: string;
|
|
|
|
ports?: MessagePort[];
|
2017-08-01 00:54:41 +02:00
|
|
|
source?: any;
|
2017-02-15 23:44:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
interface NotificationOptions {
|
2017-08-01 00:54:41 +02:00
|
|
|
body?: string;
|
2017-04-26 23:38:47 +02:00
|
|
|
dir?: NotificationDirection;
|
2017-08-01 00:54:41 +02:00
|
|
|
icon?: string;
|
2017-02-15 23:44:31 +01:00
|
|
|
lang?: string;
|
|
|
|
tag?: string;
|
|
|
|
}
|
|
|
|
|
2017-04-26 23:38:47 +02:00
|
|
|
interface ObjectURLOptions {
|
|
|
|
oneTimeOnly?: boolean;
|
|
|
|
}
|
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface PushSubscriptionOptionsInit {
|
2018-02-21 18:12:48 +01:00
|
|
|
applicationServerKey?: BufferSource | null;
|
2017-08-01 00:54:41 +02:00
|
|
|
userVisibleOnly?: boolean;
|
2017-02-15 23:44:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
interface RequestInit {
|
2018-02-21 18:12:48 +01:00
|
|
|
signal?: AbortSignal;
|
|
|
|
body?: Blob | BufferSource | FormData | string | null;
|
2017-04-26 23:38:47 +02:00
|
|
|
cache?: RequestCache;
|
2017-08-01 00:54:41 +02:00
|
|
|
credentials?: RequestCredentials;
|
2017-12-02 20:16:59 +01:00
|
|
|
headers?: HeadersInit;
|
2017-02-15 23:44:31 +01:00
|
|
|
integrity?: string;
|
|
|
|
keepalive?: boolean;
|
2017-08-01 00:54:41 +02:00
|
|
|
method?: string;
|
|
|
|
mode?: RequestMode;
|
|
|
|
redirect?: RequestRedirect;
|
|
|
|
referrer?: string;
|
|
|
|
referrerPolicy?: ReferrerPolicy;
|
2017-02-15 23:44:31 +01:00
|
|
|
window?: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ResponseInit {
|
2017-12-02 20:16:59 +01:00
|
|
|
headers?: HeadersInit;
|
2017-02-15 23:44:31 +01:00
|
|
|
status?: number;
|
|
|
|
statusText?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ClientQueryOptions {
|
|
|
|
includeUncontrolled?: boolean;
|
2017-04-26 23:38:47 +02:00
|
|
|
type?: ClientType;
|
2017-02-15 23:44:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
interface ExtendableEventInit extends EventInit {
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ExtendableMessageEventInit extends ExtendableEventInit {
|
|
|
|
data?: any;
|
|
|
|
origin?: string;
|
|
|
|
lastEventId?: string;
|
2017-09-26 22:51:27 +02:00
|
|
|
source?: Client | ServiceWorker | MessagePort | null;
|
|
|
|
ports?: MessagePort[] | null;
|
2017-02-15 23:44:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
interface FetchEventInit extends ExtendableEventInit {
|
2017-09-26 22:51:27 +02:00
|
|
|
request: Request;
|
|
|
|
clientId?: string | null;
|
2017-02-15 23:44:31 +01:00
|
|
|
isReload?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface NotificationEventInit extends ExtendableEventInit {
|
2017-09-26 22:51:27 +02:00
|
|
|
notification: Notification;
|
2017-02-15 23:44:31 +01:00
|
|
|
action?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface PushEventInit extends ExtendableEventInit {
|
2018-02-21 18:12:48 +01:00
|
|
|
data?: BufferSource | USVString;
|
2017-02-15 23:44:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
interface SyncEventInit extends ExtendableEventInit {
|
2017-09-26 22:51:27 +02:00
|
|
|
tag: string;
|
2017-02-15 23:44:31 +01:00
|
|
|
lastChance?: boolean;
|
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface EventListener {
|
|
|
|
(evt: Event): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface AudioBuffer {
|
|
|
|
readonly duration: number;
|
|
|
|
readonly length: number;
|
|
|
|
readonly numberOfChannels: number;
|
|
|
|
readonly sampleRate: number;
|
|
|
|
copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void;
|
|
|
|
copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void;
|
|
|
|
getChannelData(channel: number): Float32Array;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var AudioBuffer: {
|
|
|
|
prototype: AudioBuffer;
|
|
|
|
new(): AudioBuffer;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface Blob {
|
|
|
|
readonly size: number;
|
|
|
|
readonly type: string;
|
|
|
|
msClose(): void;
|
|
|
|
msDetachStream(): any;
|
|
|
|
slice(start?: number, end?: number, contentType?: string): Blob;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var Blob: {
|
|
|
|
prototype: Blob;
|
|
|
|
new (blobParts?: any[], options?: BlobPropertyBag): Blob;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface Cache {
|
|
|
|
add(request: RequestInfo): Promise<void>;
|
|
|
|
addAll(requests: RequestInfo[]): Promise<void>;
|
|
|
|
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
2017-09-26 22:51:27 +02:00
|
|
|
keys(request?: RequestInfo, options?: CacheQueryOptions): Promise<Request[]>;
|
2017-02-15 23:44:31 +01:00
|
|
|
match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response>;
|
2017-09-26 22:51:27 +02:00
|
|
|
matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<Response[]>;
|
2017-02-15 23:44:31 +01:00
|
|
|
put(request: RequestInfo, response: Response): Promise<void>;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var Cache: {
|
|
|
|
prototype: Cache;
|
|
|
|
new(): Cache;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface CacheStorage {
|
|
|
|
delete(cacheName: string): Promise<boolean>;
|
|
|
|
has(cacheName: string): Promise<boolean>;
|
2017-09-26 22:51:27 +02:00
|
|
|
keys(): Promise<string[]>;
|
2017-02-15 23:44:31 +01:00
|
|
|
match(request: RequestInfo, options?: CacheQueryOptions): Promise<any>;
|
|
|
|
open(cacheName: string): Promise<Cache>;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var CacheStorage: {
|
|
|
|
prototype: CacheStorage;
|
|
|
|
new(): CacheStorage;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface CloseEvent extends Event {
|
|
|
|
readonly code: number;
|
|
|
|
readonly reason: string;
|
|
|
|
readonly wasClean: boolean;
|
|
|
|
initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var CloseEvent: {
|
|
|
|
prototype: CloseEvent;
|
2017-02-15 23:44:31 +01:00
|
|
|
new(typeArg: string, eventInitDict?: CloseEventInit): CloseEvent;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface Console {
|
|
|
|
assert(test?: boolean, message?: string, ...optionalParams: any[]): void;
|
|
|
|
clear(): void;
|
|
|
|
count(countTitle?: string): void;
|
2017-02-15 23:44:31 +01:00
|
|
|
debug(message?: any, ...optionalParams: any[]): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
dir(value?: any, ...optionalParams: any[]): void;
|
|
|
|
dirxml(value: any): void;
|
|
|
|
error(message?: any, ...optionalParams: any[]): void;
|
|
|
|
exception(message?: string, ...optionalParams: any[]): void;
|
2017-08-01 00:54:41 +02:00
|
|
|
group(groupTitle?: string, ...optionalParams: any[]): void;
|
|
|
|
groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
groupEnd(): void;
|
|
|
|
info(message?: any, ...optionalParams: any[]): void;
|
|
|
|
log(message?: any, ...optionalParams: any[]): void;
|
|
|
|
msIsIndependentlyComposed(element: any): boolean;
|
|
|
|
profile(reportName?: string): void;
|
|
|
|
profileEnd(): void;
|
|
|
|
select(element: any): void;
|
|
|
|
table(...data: any[]): void;
|
|
|
|
time(timerName?: string): void;
|
|
|
|
timeEnd(timerName?: string): void;
|
|
|
|
trace(message?: any, ...optionalParams: any[]): void;
|
|
|
|
warn(message?: any, ...optionalParams: any[]): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var Console: {
|
|
|
|
prototype: Console;
|
|
|
|
new(): Console;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface Coordinates {
|
|
|
|
readonly accuracy: number;
|
|
|
|
readonly altitude: number | null;
|
|
|
|
readonly altitudeAccuracy: number | null;
|
|
|
|
readonly heading: number | null;
|
|
|
|
readonly latitude: number;
|
|
|
|
readonly longitude: number;
|
|
|
|
readonly speed: number | null;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var Coordinates: {
|
|
|
|
prototype: Coordinates;
|
|
|
|
new(): Coordinates;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface CryptoKey {
|
|
|
|
readonly algorithm: KeyAlgorithm;
|
|
|
|
readonly extractable: boolean;
|
|
|
|
readonly type: string;
|
|
|
|
readonly usages: string[];
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var CryptoKey: {
|
|
|
|
prototype: CryptoKey;
|
|
|
|
new(): CryptoKey;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface DOMError {
|
|
|
|
readonly name: string;
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var DOMError: {
|
|
|
|
prototype: DOMError;
|
|
|
|
new(): DOMError;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface DOMException {
|
|
|
|
readonly code: number;
|
|
|
|
readonly message: string;
|
|
|
|
readonly name: string;
|
|
|
|
toString(): string;
|
|
|
|
readonly ABORT_ERR: number;
|
|
|
|
readonly DATA_CLONE_ERR: number;
|
|
|
|
readonly DOMSTRING_SIZE_ERR: number;
|
|
|
|
readonly HIERARCHY_REQUEST_ERR: number;
|
|
|
|
readonly INDEX_SIZE_ERR: number;
|
|
|
|
readonly INUSE_ATTRIBUTE_ERR: number;
|
|
|
|
readonly INVALID_ACCESS_ERR: number;
|
|
|
|
readonly INVALID_CHARACTER_ERR: number;
|
|
|
|
readonly INVALID_MODIFICATION_ERR: number;
|
|
|
|
readonly INVALID_NODE_TYPE_ERR: number;
|
|
|
|
readonly INVALID_STATE_ERR: number;
|
|
|
|
readonly NAMESPACE_ERR: number;
|
|
|
|
readonly NETWORK_ERR: number;
|
|
|
|
readonly NO_DATA_ALLOWED_ERR: number;
|
|
|
|
readonly NO_MODIFICATION_ALLOWED_ERR: number;
|
2017-08-01 00:54:41 +02:00
|
|
|
readonly NOT_FOUND_ERR: number;
|
|
|
|
readonly NOT_SUPPORTED_ERR: number;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly PARSE_ERR: number;
|
|
|
|
readonly QUOTA_EXCEEDED_ERR: number;
|
|
|
|
readonly SECURITY_ERR: number;
|
|
|
|
readonly SERIALIZE_ERR: number;
|
|
|
|
readonly SYNTAX_ERR: number;
|
|
|
|
readonly TIMEOUT_ERR: number;
|
|
|
|
readonly TYPE_MISMATCH_ERR: number;
|
|
|
|
readonly URL_MISMATCH_ERR: number;
|
|
|
|
readonly VALIDATION_ERR: number;
|
|
|
|
readonly WRONG_DOCUMENT_ERR: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var DOMException: {
|
|
|
|
prototype: DOMException;
|
2017-09-26 22:51:27 +02:00
|
|
|
new(message?: string, name?: string): DOMException;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly ABORT_ERR: number;
|
|
|
|
readonly DATA_CLONE_ERR: number;
|
|
|
|
readonly DOMSTRING_SIZE_ERR: number;
|
|
|
|
readonly HIERARCHY_REQUEST_ERR: number;
|
|
|
|
readonly INDEX_SIZE_ERR: number;
|
|
|
|
readonly INUSE_ATTRIBUTE_ERR: number;
|
|
|
|
readonly INVALID_ACCESS_ERR: number;
|
|
|
|
readonly INVALID_CHARACTER_ERR: number;
|
|
|
|
readonly INVALID_MODIFICATION_ERR: number;
|
|
|
|
readonly INVALID_NODE_TYPE_ERR: number;
|
|
|
|
readonly INVALID_STATE_ERR: number;
|
|
|
|
readonly NAMESPACE_ERR: number;
|
|
|
|
readonly NETWORK_ERR: number;
|
|
|
|
readonly NO_DATA_ALLOWED_ERR: number;
|
|
|
|
readonly NO_MODIFICATION_ALLOWED_ERR: number;
|
2017-08-01 00:54:41 +02:00
|
|
|
readonly NOT_FOUND_ERR: number;
|
|
|
|
readonly NOT_SUPPORTED_ERR: number;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly PARSE_ERR: number;
|
|
|
|
readonly QUOTA_EXCEEDED_ERR: number;
|
|
|
|
readonly SECURITY_ERR: number;
|
|
|
|
readonly SERIALIZE_ERR: number;
|
|
|
|
readonly SYNTAX_ERR: number;
|
|
|
|
readonly TIMEOUT_ERR: number;
|
|
|
|
readonly TYPE_MISMATCH_ERR: number;
|
|
|
|
readonly URL_MISMATCH_ERR: number;
|
|
|
|
readonly VALIDATION_ERR: number;
|
|
|
|
readonly WRONG_DOCUMENT_ERR: number;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface DOMStringList {
|
|
|
|
readonly length: number;
|
|
|
|
contains(str: string): boolean;
|
|
|
|
item(index: number): string | null;
|
|
|
|
[index: number]: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var DOMStringList: {
|
|
|
|
prototype: DOMStringList;
|
|
|
|
new(): DOMStringList;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface ErrorEvent extends Event {
|
|
|
|
readonly colno: number;
|
|
|
|
readonly error: any;
|
|
|
|
readonly filename: string;
|
|
|
|
readonly lineno: number;
|
|
|
|
readonly message: string;
|
|
|
|
initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var ErrorEvent: {
|
|
|
|
prototype: ErrorEvent;
|
2017-02-15 23:44:31 +01:00
|
|
|
new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface Event {
|
|
|
|
readonly bubbles: boolean;
|
|
|
|
readonly cancelable: boolean;
|
2017-08-01 00:54:41 +02:00
|
|
|
cancelBubble: boolean;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly currentTarget: EventTarget;
|
|
|
|
readonly defaultPrevented: boolean;
|
|
|
|
readonly eventPhase: number;
|
|
|
|
readonly isTrusted: boolean;
|
|
|
|
returnValue: boolean;
|
|
|
|
readonly srcElement: any;
|
|
|
|
readonly target: EventTarget;
|
|
|
|
readonly timeStamp: number;
|
|
|
|
readonly type: string;
|
2016-12-15 22:46:39 +01:00
|
|
|
readonly scoped: boolean;
|
2016-12-15 07:03:00 +01:00
|
|
|
initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
|
|
|
|
preventDefault(): void;
|
|
|
|
stopImmediatePropagation(): void;
|
|
|
|
stopPropagation(): void;
|
2016-12-15 22:46:39 +01:00
|
|
|
deepPath(): EventTarget[];
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly AT_TARGET: number;
|
|
|
|
readonly BUBBLING_PHASE: number;
|
|
|
|
readonly CAPTURING_PHASE: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var Event: {
|
|
|
|
prototype: Event;
|
2017-02-15 23:44:31 +01:00
|
|
|
new(typeArg: string, eventInitDict?: EventInit): Event;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly AT_TARGET: number;
|
|
|
|
readonly BUBBLING_PHASE: number;
|
|
|
|
readonly CAPTURING_PHASE: number;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface EventTarget {
|
2018-02-21 18:12:48 +01:00
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
dispatchEvent(evt: Event): boolean;
|
2018-02-21 18:12:48 +01:00
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var EventTarget: {
|
|
|
|
prototype: EventTarget;
|
|
|
|
new(): EventTarget;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface File extends Blob {
|
2018-02-21 18:12:48 +01:00
|
|
|
readonly lastModifiedDate: Date;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly name: string;
|
|
|
|
readonly webkitRelativePath: string;
|
2018-02-21 18:12:48 +01:00
|
|
|
readonly lastModified: number;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var File: {
|
|
|
|
prototype: File;
|
|
|
|
new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface FileList {
|
|
|
|
readonly length: number;
|
|
|
|
item(index: number): File;
|
|
|
|
[index: number]: File;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var FileList: {
|
|
|
|
prototype: FileList;
|
|
|
|
new(): FileList;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface FileReader extends EventTarget, MSBaseReader {
|
|
|
|
readonly error: DOMError;
|
|
|
|
readAsArrayBuffer(blob: Blob): void;
|
|
|
|
readAsBinaryString(blob: Blob): void;
|
|
|
|
readAsDataURL(blob: Blob): void;
|
|
|
|
readAsText(blob: Blob, encoding?: string): void;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: FileReader, ev: MSBaseReaderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: FileReader, ev: MSBaseReaderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var FileReader: {
|
|
|
|
prototype: FileReader;
|
|
|
|
new(): FileReader;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
interface FormData {
|
|
|
|
append(name: string, value: string | Blob, fileName?: string): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
2017-08-01 00:54:41 +02:00
|
|
|
declare var FormData: {
|
|
|
|
prototype: FormData;
|
|
|
|
new(): FormData;
|
|
|
|
};
|
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface Headers {
|
|
|
|
append(name: string, value: string): void;
|
|
|
|
delete(name: string): void;
|
|
|
|
forEach(callback: ForEachCallback): void;
|
|
|
|
get(name: string): string | null;
|
|
|
|
has(name: string): boolean;
|
|
|
|
set(name: string, value: string): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var Headers: {
|
|
|
|
prototype: Headers;
|
2017-12-02 20:16:59 +01:00
|
|
|
new(init?: HeadersInit): Headers;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface IDBCursor {
|
2017-04-26 23:38:47 +02:00
|
|
|
readonly direction: IDBCursorDirection;
|
2016-12-15 07:03:00 +01:00
|
|
|
key: IDBKeyRange | IDBValidKey;
|
|
|
|
readonly primaryKey: any;
|
|
|
|
source: IDBObjectStore | IDBIndex;
|
|
|
|
advance(count: number): void;
|
|
|
|
continue(key?: IDBKeyRange | IDBValidKey): void;
|
|
|
|
delete(): IDBRequest;
|
|
|
|
update(value: any): IDBRequest;
|
|
|
|
readonly NEXT: string;
|
|
|
|
readonly NEXT_NO_DUPLICATE: string;
|
|
|
|
readonly PREV: string;
|
|
|
|
readonly PREV_NO_DUPLICATE: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var IDBCursor: {
|
|
|
|
prototype: IDBCursor;
|
|
|
|
new(): IDBCursor;
|
|
|
|
readonly NEXT: string;
|
|
|
|
readonly NEXT_NO_DUPLICATE: string;
|
|
|
|
readonly PREV: string;
|
|
|
|
readonly PREV_NO_DUPLICATE: string;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface IDBCursorWithValue extends IDBCursor {
|
|
|
|
readonly value: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var IDBCursorWithValue: {
|
|
|
|
prototype: IDBCursorWithValue;
|
|
|
|
new(): IDBCursorWithValue;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
2016-12-15 22:46:39 +01:00
|
|
|
interface IDBDatabaseEventMap {
|
|
|
|
"abort": Event;
|
2017-02-15 23:44:31 +01:00
|
|
|
"error": Event;
|
2016-12-15 22:46:39 +01:00
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface IDBDatabase extends EventTarget {
|
|
|
|
readonly name: string;
|
|
|
|
readonly objectStoreNames: DOMStringList;
|
2016-12-15 22:46:39 +01:00
|
|
|
onabort: (this: IDBDatabase, ev: Event) => any;
|
2017-02-15 23:44:31 +01:00
|
|
|
onerror: (this: IDBDatabase, ev: Event) => any;
|
2016-12-15 07:03:00 +01:00
|
|
|
version: number;
|
|
|
|
onversionchange: (ev: IDBVersionChangeEvent) => any;
|
|
|
|
close(): void;
|
|
|
|
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
|
|
|
|
deleteObjectStore(name: string): void;
|
2017-08-01 00:54:41 +02:00
|
|
|
transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener(type: "versionchange", listener: (this: IDBDatabase, ev: IDBVersionChangeEvent) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener(type: "versionchange", listener: (this: IDBDatabase, ev: IDBVersionChangeEvent) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var IDBDatabase: {
|
|
|
|
prototype: IDBDatabase;
|
|
|
|
new(): IDBDatabase;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface IDBFactory {
|
|
|
|
cmp(first: any, second: any): number;
|
|
|
|
deleteDatabase(name: string): IDBOpenDBRequest;
|
|
|
|
open(name: string, version?: number): IDBOpenDBRequest;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var IDBFactory: {
|
|
|
|
prototype: IDBFactory;
|
|
|
|
new(): IDBFactory;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface IDBIndex {
|
|
|
|
keyPath: string | string[];
|
|
|
|
readonly name: string;
|
|
|
|
readonly objectStore: IDBObjectStore;
|
|
|
|
readonly unique: boolean;
|
|
|
|
multiEntry: boolean;
|
|
|
|
count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
|
|
|
|
get(key: IDBKeyRange | IDBValidKey): IDBRequest;
|
|
|
|
getKey(key: IDBKeyRange | IDBValidKey): IDBRequest;
|
2017-08-01 00:54:41 +02:00
|
|
|
openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
|
|
|
|
openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var IDBIndex: {
|
|
|
|
prototype: IDBIndex;
|
|
|
|
new(): IDBIndex;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface IDBKeyRange {
|
|
|
|
readonly lower: any;
|
|
|
|
readonly lowerOpen: boolean;
|
|
|
|
readonly upper: any;
|
|
|
|
readonly upperOpen: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var IDBKeyRange: {
|
|
|
|
prototype: IDBKeyRange;
|
|
|
|
new(): IDBKeyRange;
|
|
|
|
bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
|
|
|
|
lowerBound(lower: any, open?: boolean): IDBKeyRange;
|
|
|
|
only(value: any): IDBKeyRange;
|
|
|
|
upperBound(upper: any, open?: boolean): IDBKeyRange;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface IDBObjectStore {
|
|
|
|
readonly indexNames: DOMStringList;
|
|
|
|
keyPath: string | string[];
|
|
|
|
readonly name: string;
|
|
|
|
readonly transaction: IDBTransaction;
|
|
|
|
autoIncrement: boolean;
|
|
|
|
add(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
|
|
|
|
clear(): IDBRequest;
|
|
|
|
count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
|
|
|
|
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
|
|
|
|
delete(key: IDBKeyRange | IDBValidKey): IDBRequest;
|
|
|
|
deleteIndex(indexName: string): void;
|
|
|
|
get(key: any): IDBRequest;
|
|
|
|
index(name: string): IDBIndex;
|
2017-08-01 00:54:41 +02:00
|
|
|
openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest;
|
2016-12-15 07:03:00 +01:00
|
|
|
put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var IDBObjectStore: {
|
|
|
|
prototype: IDBObjectStore;
|
|
|
|
new(): IDBObjectStore;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
2016-12-15 22:46:39 +01:00
|
|
|
interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
|
|
|
|
"blocked": Event;
|
|
|
|
"upgradeneeded": IDBVersionChangeEvent;
|
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface IDBOpenDBRequest extends IDBRequest {
|
2016-12-15 22:46:39 +01:00
|
|
|
onblocked: (this: IDBOpenDBRequest, ev: Event) => any;
|
|
|
|
onupgradeneeded: (this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var IDBOpenDBRequest: {
|
|
|
|
prototype: IDBOpenDBRequest;
|
|
|
|
new(): IDBOpenDBRequest;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
2016-12-15 22:46:39 +01:00
|
|
|
interface IDBRequestEventMap {
|
2017-02-15 23:44:31 +01:00
|
|
|
"error": Event;
|
2016-12-15 22:46:39 +01:00
|
|
|
"success": Event;
|
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface IDBRequest extends EventTarget {
|
2017-08-01 00:54:41 +02:00
|
|
|
readonly error: DOMException;
|
2017-02-15 23:44:31 +01:00
|
|
|
onerror: (this: IDBRequest, ev: Event) => any;
|
2016-12-15 22:46:39 +01:00
|
|
|
onsuccess: (this: IDBRequest, ev: Event) => any;
|
2017-04-26 23:38:47 +02:00
|
|
|
readonly readyState: IDBRequestReadyState;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly result: any;
|
|
|
|
source: IDBObjectStore | IDBIndex | IDBCursor;
|
|
|
|
readonly transaction: IDBTransaction;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest, ev: IDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var IDBRequest: {
|
|
|
|
prototype: IDBRequest;
|
|
|
|
new(): IDBRequest;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
2016-12-15 22:46:39 +01:00
|
|
|
interface IDBTransactionEventMap {
|
|
|
|
"abort": Event;
|
|
|
|
"complete": Event;
|
2017-02-15 23:44:31 +01:00
|
|
|
"error": Event;
|
2016-12-15 22:46:39 +01:00
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface IDBTransaction extends EventTarget {
|
|
|
|
readonly db: IDBDatabase;
|
2017-08-01 00:54:41 +02:00
|
|
|
readonly error: DOMException;
|
2017-04-26 23:38:47 +02:00
|
|
|
readonly mode: IDBTransactionMode;
|
2016-12-15 22:46:39 +01:00
|
|
|
onabort: (this: IDBTransaction, ev: Event) => any;
|
|
|
|
oncomplete: (this: IDBTransaction, ev: Event) => any;
|
2017-02-15 23:44:31 +01:00
|
|
|
onerror: (this: IDBTransaction, ev: Event) => any;
|
2016-12-15 07:03:00 +01:00
|
|
|
abort(): void;
|
|
|
|
objectStore(name: string): IDBObjectStore;
|
|
|
|
readonly READ_ONLY: string;
|
|
|
|
readonly READ_WRITE: string;
|
|
|
|
readonly VERSION_CHANGE: string;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var IDBTransaction: {
|
|
|
|
prototype: IDBTransaction;
|
|
|
|
new(): IDBTransaction;
|
|
|
|
readonly READ_ONLY: string;
|
|
|
|
readonly READ_WRITE: string;
|
|
|
|
readonly VERSION_CHANGE: string;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface IDBVersionChangeEvent extends Event {
|
|
|
|
readonly newVersion: number | null;
|
|
|
|
readonly oldVersion: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var IDBVersionChangeEvent: {
|
|
|
|
prototype: IDBVersionChangeEvent;
|
|
|
|
new(): IDBVersionChangeEvent;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface ImageData {
|
|
|
|
data: Uint8ClampedArray;
|
|
|
|
readonly height: number;
|
|
|
|
readonly width: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var ImageData: {
|
|
|
|
prototype: ImageData;
|
|
|
|
new(width: number, height: number): ImageData;
|
|
|
|
new(array: Uint8ClampedArray, width: number, height: number): ImageData;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface MessageChannel {
|
|
|
|
readonly port1: MessagePort;
|
|
|
|
readonly port2: MessagePort;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var MessageChannel: {
|
|
|
|
prototype: MessageChannel;
|
|
|
|
new(): MessageChannel;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface MessageEvent extends Event {
|
|
|
|
readonly data: any;
|
|
|
|
readonly origin: string;
|
|
|
|
readonly ports: any;
|
|
|
|
readonly source: any;
|
|
|
|
initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: any): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var MessageEvent: {
|
|
|
|
prototype: MessageEvent;
|
|
|
|
new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
2016-12-15 22:46:39 +01:00
|
|
|
interface MessagePortEventMap {
|
|
|
|
"message": MessageEvent;
|
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface MessagePort extends EventTarget {
|
2016-12-15 22:46:39 +01:00
|
|
|
onmessage: (this: MessagePort, ev: MessageEvent) => any;
|
2016-12-15 07:03:00 +01:00
|
|
|
close(): void;
|
2017-02-15 23:44:31 +01:00
|
|
|
postMessage(message?: any, transfer?: any[]): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
start(): void;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var MessagePort: {
|
|
|
|
prototype: MessagePort;
|
|
|
|
new(): MessagePort;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface NotificationEventMap {
|
|
|
|
"click": Event;
|
|
|
|
"close": Event;
|
|
|
|
"error": Event;
|
|
|
|
"show": Event;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Notification extends EventTarget {
|
|
|
|
readonly body: string;
|
2017-04-26 23:38:47 +02:00
|
|
|
readonly dir: NotificationDirection;
|
2017-02-15 23:44:31 +01:00
|
|
|
readonly icon: string;
|
|
|
|
readonly lang: string;
|
|
|
|
onclick: (this: Notification, ev: Event) => any;
|
|
|
|
onclose: (this: Notification, ev: Event) => any;
|
|
|
|
onerror: (this: Notification, ev: Event) => any;
|
|
|
|
onshow: (this: Notification, ev: Event) => any;
|
2017-04-26 23:38:47 +02:00
|
|
|
readonly permission: NotificationPermission;
|
2017-02-15 23:44:31 +01:00
|
|
|
readonly tag: string;
|
|
|
|
readonly title: string;
|
|
|
|
close(): void;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2017-02-15 23:44:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var Notification: {
|
|
|
|
prototype: Notification;
|
|
|
|
new(title: string, options?: NotificationOptions): Notification;
|
2017-04-26 23:38:47 +02:00
|
|
|
requestPermission(callback?: NotificationPermissionCallback): Promise<NotificationPermission>;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface Performance {
|
|
|
|
readonly navigation: PerformanceNavigation;
|
|
|
|
readonly timing: PerformanceTiming;
|
|
|
|
clearMarks(markName?: string): void;
|
|
|
|
clearMeasures(measureName?: string): void;
|
|
|
|
clearResourceTimings(): void;
|
|
|
|
getEntries(): any;
|
|
|
|
getEntriesByName(name: string, entryType?: string): any;
|
|
|
|
getEntriesByType(entryType: string): any;
|
|
|
|
getMarks(markName?: string): any;
|
|
|
|
getMeasures(measureName?: string): any;
|
|
|
|
mark(markName: string): void;
|
|
|
|
measure(measureName: string, startMarkName?: string, endMarkName?: string): void;
|
|
|
|
now(): number;
|
|
|
|
setResourceTimingBufferSize(maxSize: number): void;
|
|
|
|
toJSON(): any;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var Performance: {
|
|
|
|
prototype: Performance;
|
|
|
|
new(): Performance;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface PerformanceNavigation {
|
|
|
|
readonly redirectCount: number;
|
|
|
|
readonly type: number;
|
|
|
|
toJSON(): any;
|
|
|
|
readonly TYPE_BACK_FORWARD: number;
|
|
|
|
readonly TYPE_NAVIGATE: number;
|
|
|
|
readonly TYPE_RELOAD: number;
|
|
|
|
readonly TYPE_RESERVED: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var PerformanceNavigation: {
|
|
|
|
prototype: PerformanceNavigation;
|
|
|
|
new(): PerformanceNavigation;
|
|
|
|
readonly TYPE_BACK_FORWARD: number;
|
|
|
|
readonly TYPE_NAVIGATE: number;
|
|
|
|
readonly TYPE_RELOAD: number;
|
|
|
|
readonly TYPE_RESERVED: number;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface PerformanceTiming {
|
|
|
|
readonly connectEnd: number;
|
|
|
|
readonly connectStart: number;
|
2017-08-01 00:54:41 +02:00
|
|
|
readonly domainLookupEnd: number;
|
|
|
|
readonly domainLookupStart: number;
|
2017-02-15 23:44:31 +01:00
|
|
|
readonly domComplete: number;
|
|
|
|
readonly domContentLoadedEventEnd: number;
|
|
|
|
readonly domContentLoadedEventStart: number;
|
|
|
|
readonly domInteractive: number;
|
|
|
|
readonly domLoading: number;
|
|
|
|
readonly fetchStart: number;
|
|
|
|
readonly loadEventEnd: number;
|
|
|
|
readonly loadEventStart: number;
|
|
|
|
readonly msFirstPaint: number;
|
|
|
|
readonly navigationStart: number;
|
|
|
|
readonly redirectEnd: number;
|
|
|
|
readonly redirectStart: number;
|
|
|
|
readonly requestStart: number;
|
|
|
|
readonly responseEnd: number;
|
|
|
|
readonly responseStart: number;
|
|
|
|
readonly unloadEventEnd: number;
|
|
|
|
readonly unloadEventStart: number;
|
|
|
|
readonly secureConnectionStart: number;
|
|
|
|
toJSON(): any;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var PerformanceTiming: {
|
|
|
|
prototype: PerformanceTiming;
|
|
|
|
new(): PerformanceTiming;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface Position {
|
|
|
|
readonly coords: Coordinates;
|
|
|
|
readonly timestamp: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var Position: {
|
|
|
|
prototype: Position;
|
|
|
|
new(): Position;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface PositionError {
|
|
|
|
readonly code: number;
|
|
|
|
readonly message: string;
|
|
|
|
toString(): string;
|
|
|
|
readonly PERMISSION_DENIED: number;
|
|
|
|
readonly POSITION_UNAVAILABLE: number;
|
|
|
|
readonly TIMEOUT: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var PositionError: {
|
|
|
|
prototype: PositionError;
|
|
|
|
new(): PositionError;
|
|
|
|
readonly PERMISSION_DENIED: number;
|
|
|
|
readonly POSITION_UNAVAILABLE: number;
|
|
|
|
readonly TIMEOUT: number;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface ProgressEvent extends Event {
|
|
|
|
readonly lengthComputable: boolean;
|
|
|
|
readonly loaded: number;
|
|
|
|
readonly total: number;
|
|
|
|
initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var ProgressEvent: {
|
|
|
|
prototype: ProgressEvent;
|
|
|
|
new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface PushManager {
|
2018-02-21 18:12:48 +01:00
|
|
|
getSubscription(): Promise<PushSubscription | null>;
|
2017-04-26 23:38:47 +02:00
|
|
|
permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
|
2017-02-15 23:44:31 +01:00
|
|
|
subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var PushManager: {
|
|
|
|
prototype: PushManager;
|
|
|
|
new(): PushManager;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface PushSubscription {
|
|
|
|
readonly endpoint: USVString;
|
|
|
|
readonly options: PushSubscriptionOptions;
|
2017-04-26 23:38:47 +02:00
|
|
|
getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
|
2017-02-15 23:44:31 +01:00
|
|
|
toJSON(): any;
|
|
|
|
unsubscribe(): Promise<boolean>;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var PushSubscription: {
|
|
|
|
prototype: PushSubscription;
|
|
|
|
new(): PushSubscription;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface PushSubscriptionOptions {
|
|
|
|
readonly applicationServerKey: ArrayBuffer | null;
|
|
|
|
readonly userVisibleOnly: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var PushSubscriptionOptions: {
|
|
|
|
prototype: PushSubscriptionOptions;
|
|
|
|
new(): PushSubscriptionOptions;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface ReadableStream {
|
|
|
|
readonly locked: boolean;
|
|
|
|
cancel(): Promise<void>;
|
|
|
|
getReader(): ReadableStreamReader;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var ReadableStream: {
|
|
|
|
prototype: ReadableStream;
|
|
|
|
new(): ReadableStream;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface ReadableStreamReader {
|
|
|
|
cancel(): Promise<void>;
|
|
|
|
read(): Promise<any>;
|
|
|
|
releaseLock(): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var ReadableStreamReader: {
|
|
|
|
prototype: ReadableStreamReader;
|
|
|
|
new(): ReadableStreamReader;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface Request extends Object, Body {
|
2017-04-26 23:38:47 +02:00
|
|
|
readonly cache: RequestCache;
|
|
|
|
readonly credentials: RequestCredentials;
|
|
|
|
readonly destination: RequestDestination;
|
2017-02-15 23:44:31 +01:00
|
|
|
readonly headers: Headers;
|
|
|
|
readonly integrity: string;
|
|
|
|
readonly keepalive: boolean;
|
|
|
|
readonly method: string;
|
2017-04-26 23:38:47 +02:00
|
|
|
readonly mode: RequestMode;
|
|
|
|
readonly redirect: RequestRedirect;
|
2017-02-15 23:44:31 +01:00
|
|
|
readonly referrer: string;
|
2017-04-26 23:38:47 +02:00
|
|
|
readonly referrerPolicy: ReferrerPolicy;
|
|
|
|
readonly type: RequestType;
|
2017-02-15 23:44:31 +01:00
|
|
|
readonly url: string;
|
2018-02-21 18:12:48 +01:00
|
|
|
readonly signal: AbortSignal;
|
2017-02-15 23:44:31 +01:00
|
|
|
clone(): Request;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var Request: {
|
|
|
|
prototype: Request;
|
|
|
|
new(input: Request | string, init?: RequestInit): Request;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface Response extends Object, Body {
|
|
|
|
readonly body: ReadableStream | null;
|
|
|
|
readonly headers: Headers;
|
|
|
|
readonly ok: boolean;
|
|
|
|
readonly status: number;
|
|
|
|
readonly statusText: string;
|
2017-04-26 23:38:47 +02:00
|
|
|
readonly type: ResponseType;
|
2017-02-15 23:44:31 +01:00
|
|
|
readonly url: string;
|
2017-09-26 22:51:27 +02:00
|
|
|
readonly redirected: boolean;
|
2017-02-15 23:44:31 +01:00
|
|
|
clone(): Response;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var Response: {
|
|
|
|
prototype: Response;
|
|
|
|
new(body?: any, init?: ResponseInit): Response;
|
2017-08-01 00:54:41 +02:00
|
|
|
error: () => Response;
|
|
|
|
redirect: (url: string, status?: number) => Response;
|
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
|
|
|
|
"statechange": Event;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ServiceWorker extends EventTarget, AbstractWorker {
|
|
|
|
onstatechange: (this: ServiceWorker, ev: Event) => any;
|
|
|
|
readonly scriptURL: USVString;
|
2017-04-26 23:38:47 +02:00
|
|
|
readonly state: ServiceWorkerState;
|
2017-02-15 23:44:31 +01:00
|
|
|
postMessage(message: any, transfer?: any[]): void;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2017-02-15 23:44:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var ServiceWorker: {
|
|
|
|
prototype: ServiceWorker;
|
|
|
|
new(): ServiceWorker;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface ServiceWorkerRegistrationEventMap {
|
|
|
|
"updatefound": Event;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ServiceWorkerRegistration extends EventTarget {
|
|
|
|
readonly active: ServiceWorker | null;
|
|
|
|
readonly installing: ServiceWorker | null;
|
|
|
|
onupdatefound: (this: ServiceWorkerRegistration, ev: Event) => any;
|
|
|
|
readonly pushManager: PushManager;
|
|
|
|
readonly scope: USVString;
|
|
|
|
readonly sync: SyncManager;
|
|
|
|
readonly waiting: ServiceWorker | null;
|
2017-09-26 22:51:27 +02:00
|
|
|
getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>;
|
2017-02-15 23:44:31 +01:00
|
|
|
showNotification(title: string, options?: NotificationOptions): Promise<void>;
|
|
|
|
unregister(): Promise<boolean>;
|
|
|
|
update(): Promise<void>;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2017-02-15 23:44:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var ServiceWorkerRegistration: {
|
|
|
|
prototype: ServiceWorkerRegistration;
|
|
|
|
new(): ServiceWorkerRegistration;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface SyncManager {
|
2017-09-26 22:51:27 +02:00
|
|
|
getTags(): Promise<string[]>;
|
2017-02-15 23:44:31 +01:00
|
|
|
register(tag: string): Promise<void>;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var SyncManager: {
|
|
|
|
prototype: SyncManager;
|
|
|
|
new(): SyncManager;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
2017-04-26 23:38:47 +02:00
|
|
|
interface URL {
|
|
|
|
hash: string;
|
|
|
|
host: string;
|
|
|
|
hostname: string;
|
|
|
|
href: string;
|
|
|
|
readonly origin: string;
|
|
|
|
password: string;
|
|
|
|
pathname: string;
|
|
|
|
port: string;
|
|
|
|
protocol: string;
|
|
|
|
search: string;
|
|
|
|
username: string;
|
|
|
|
readonly searchParams: URLSearchParams;
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var URL: {
|
|
|
|
prototype: URL;
|
2018-02-21 18:12:48 +01:00
|
|
|
new(url: string, base?: string | URL): URL;
|
2017-04-26 23:38:47 +02:00
|
|
|
createObjectURL(object: any, options?: ObjectURLOptions): string;
|
|
|
|
revokeObjectURL(url: string): void;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-04-26 23:38:47 +02:00
|
|
|
|
2016-12-15 22:46:39 +01:00
|
|
|
interface WebSocketEventMap {
|
|
|
|
"close": CloseEvent;
|
2017-02-15 23:44:31 +01:00
|
|
|
"error": Event;
|
2016-12-15 22:46:39 +01:00
|
|
|
"message": MessageEvent;
|
|
|
|
"open": Event;
|
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface WebSocket extends EventTarget {
|
|
|
|
binaryType: string;
|
|
|
|
readonly bufferedAmount: number;
|
|
|
|
readonly extensions: string;
|
2016-12-15 22:46:39 +01:00
|
|
|
onclose: (this: WebSocket, ev: CloseEvent) => any;
|
2017-02-15 23:44:31 +01:00
|
|
|
onerror: (this: WebSocket, ev: Event) => any;
|
2016-12-15 22:46:39 +01:00
|
|
|
onmessage: (this: WebSocket, ev: MessageEvent) => any;
|
|
|
|
onopen: (this: WebSocket, ev: Event) => any;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly protocol: string;
|
|
|
|
readonly readyState: number;
|
|
|
|
readonly url: string;
|
|
|
|
close(code?: number, reason?: string): void;
|
2018-02-21 18:12:48 +01:00
|
|
|
send(data: USVString | ArrayBuffer | Blob | ArrayBufferView): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly CLOSED: number;
|
|
|
|
readonly CLOSING: number;
|
|
|
|
readonly CONNECTING: number;
|
|
|
|
readonly OPEN: number;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var WebSocket: {
|
|
|
|
prototype: WebSocket;
|
|
|
|
new(url: string, protocols?: string | string[]): WebSocket;
|
|
|
|
readonly CLOSED: number;
|
|
|
|
readonly CLOSING: number;
|
|
|
|
readonly CONNECTING: number;
|
|
|
|
readonly OPEN: number;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
2016-12-15 22:46:39 +01:00
|
|
|
interface WorkerEventMap extends AbstractWorkerEventMap {
|
|
|
|
"message": MessageEvent;
|
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface Worker extends EventTarget, AbstractWorker {
|
2016-12-15 22:46:39 +01:00
|
|
|
onmessage: (this: Worker, ev: MessageEvent) => any;
|
2017-02-15 23:44:31 +01:00
|
|
|
postMessage(message: any, transfer?: any[]): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
terminate(): void;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var Worker: {
|
|
|
|
prototype: Worker;
|
|
|
|
new(stringUrl: string): Worker;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
2016-12-15 22:46:39 +01:00
|
|
|
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
|
|
|
|
"readystatechange": Event;
|
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
|
2016-12-15 22:46:39 +01:00
|
|
|
onreadystatechange: (this: XMLHttpRequest, ev: Event) => any;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly readyState: number;
|
|
|
|
readonly response: any;
|
|
|
|
readonly responseText: string;
|
2017-04-26 23:38:47 +02:00
|
|
|
responseType: XMLHttpRequestResponseType;
|
2017-02-15 23:44:31 +01:00
|
|
|
readonly responseURL: string;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly responseXML: any;
|
|
|
|
readonly status: number;
|
|
|
|
readonly statusText: string;
|
|
|
|
timeout: number;
|
|
|
|
readonly upload: XMLHttpRequestUpload;
|
|
|
|
withCredentials: boolean;
|
|
|
|
msCaching?: string;
|
|
|
|
abort(): void;
|
|
|
|
getAllResponseHeaders(): string;
|
|
|
|
getResponseHeader(header: string): string | null;
|
|
|
|
msCachingEnabled(): boolean;
|
|
|
|
open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
|
|
|
|
overrideMimeType(mime: string): void;
|
|
|
|
send(data?: string): void;
|
|
|
|
send(data?: any): void;
|
|
|
|
setRequestHeader(header: string, value: string): void;
|
|
|
|
readonly DONE: number;
|
|
|
|
readonly HEADERS_RECEIVED: number;
|
|
|
|
readonly LOADING: number;
|
|
|
|
readonly OPENED: number;
|
|
|
|
readonly UNSENT: number;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var XMLHttpRequest: {
|
|
|
|
prototype: XMLHttpRequest;
|
|
|
|
new(): XMLHttpRequest;
|
|
|
|
readonly DONE: number;
|
|
|
|
readonly HEADERS_RECEIVED: number;
|
|
|
|
readonly LOADING: number;
|
|
|
|
readonly OPENED: number;
|
|
|
|
readonly UNSENT: number;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget {
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var XMLHttpRequestUpload: {
|
|
|
|
prototype: XMLHttpRequestUpload;
|
|
|
|
new(): XMLHttpRequestUpload;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
2016-12-15 22:46:39 +01:00
|
|
|
interface AbstractWorkerEventMap {
|
|
|
|
"error": ErrorEvent;
|
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface AbstractWorker {
|
2016-12-15 22:46:39 +01:00
|
|
|
onerror: (this: AbstractWorker, ev: ErrorEvent) => any;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface Body {
|
|
|
|
readonly bodyUsed: boolean;
|
|
|
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
|
|
blob(): Promise<Blob>;
|
|
|
|
json(): Promise<any>;
|
|
|
|
text(): Promise<string>;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface GlobalFetch {
|
|
|
|
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
|
|
}
|
|
|
|
|
2016-12-15 22:46:39 +01:00
|
|
|
interface MSBaseReaderEventMap {
|
|
|
|
"abort": Event;
|
|
|
|
"error": ErrorEvent;
|
|
|
|
"load": Event;
|
|
|
|
"loadend": ProgressEvent;
|
|
|
|
"loadstart": Event;
|
|
|
|
"progress": ProgressEvent;
|
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface MSBaseReader {
|
2016-12-15 22:46:39 +01:00
|
|
|
onabort: (this: MSBaseReader, ev: Event) => any;
|
|
|
|
onerror: (this: MSBaseReader, ev: ErrorEvent) => any;
|
|
|
|
onload: (this: MSBaseReader, ev: Event) => any;
|
|
|
|
onloadend: (this: MSBaseReader, ev: ProgressEvent) => any;
|
|
|
|
onloadstart: (this: MSBaseReader, ev: Event) => any;
|
|
|
|
onprogress: (this: MSBaseReader, ev: ProgressEvent) => any;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly readyState: number;
|
|
|
|
readonly result: any;
|
|
|
|
abort(): void;
|
|
|
|
readonly DONE: number;
|
|
|
|
readonly EMPTY: number;
|
|
|
|
readonly LOADING: number;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof MSBaseReaderEventMap>(type: K, listener: (this: MSBaseReader, ev: MSBaseReaderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface NavigatorBeacon {
|
|
|
|
sendBeacon(url: USVString, data?: BodyInit): boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface NavigatorConcurrentHardware {
|
|
|
|
readonly hardwareConcurrency: number;
|
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface NavigatorID {
|
2017-02-15 23:44:31 +01:00
|
|
|
readonly appCodeName: string;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly appName: string;
|
|
|
|
readonly appVersion: string;
|
|
|
|
readonly platform: string;
|
|
|
|
readonly product: string;
|
|
|
|
readonly productSub: string;
|
|
|
|
readonly userAgent: string;
|
|
|
|
readonly vendor: string;
|
|
|
|
readonly vendorSub: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface NavigatorOnLine {
|
|
|
|
readonly onLine: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface WindowBase64 {
|
|
|
|
atob(encodedString: string): string;
|
|
|
|
btoa(rawString: string): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface WindowConsole {
|
|
|
|
readonly console: Console;
|
|
|
|
}
|
|
|
|
|
2016-12-15 22:46:39 +01:00
|
|
|
interface XMLHttpRequestEventTargetEventMap {
|
|
|
|
"abort": Event;
|
|
|
|
"error": ErrorEvent;
|
|
|
|
"load": Event;
|
|
|
|
"loadend": ProgressEvent;
|
|
|
|
"loadstart": Event;
|
|
|
|
"progress": ProgressEvent;
|
|
|
|
"timeout": ProgressEvent;
|
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface XMLHttpRequestEventTarget {
|
2017-09-26 22:51:27 +02:00
|
|
|
onabort: (this: XMLHttpRequest, ev: Event) => any;
|
|
|
|
onerror: (this: XMLHttpRequest, ev: ErrorEvent) => any;
|
|
|
|
onload: (this: XMLHttpRequest, ev: Event) => any;
|
|
|
|
onloadend: (this: XMLHttpRequest, ev: ProgressEvent) => any;
|
|
|
|
onloadstart: (this: XMLHttpRequest, ev: Event) => any;
|
|
|
|
onprogress: (this: XMLHttpRequest, ev: ProgressEvent) => any;
|
|
|
|
ontimeout: (this: XMLHttpRequest, ev: ProgressEvent) => any;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface Client {
|
2017-04-26 23:38:47 +02:00
|
|
|
readonly frameType: FrameType;
|
2017-02-15 23:44:31 +01:00
|
|
|
readonly id: string;
|
|
|
|
readonly url: USVString;
|
|
|
|
postMessage(message: any, transfer?: any[]): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var Client: {
|
|
|
|
prototype: Client;
|
|
|
|
new(): Client;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface Clients {
|
|
|
|
claim(): Promise<void>;
|
|
|
|
get(id: string): Promise<any>;
|
2017-09-26 22:51:27 +02:00
|
|
|
matchAll(options?: ClientQueryOptions): Promise<Client[]>;
|
2017-02-15 23:44:31 +01:00
|
|
|
openWindow(url: USVString): Promise<WindowClient>;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var Clients: {
|
|
|
|
prototype: Clients;
|
|
|
|
new(): Clients;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
|
|
|
|
"message": MessageEvent;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface DedicatedWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
|
onmessage: (this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any;
|
|
|
|
close(): void;
|
|
|
|
postMessage(message: any, transfer?: any[]): void;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2017-02-15 23:44:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var DedicatedWorkerGlobalScope: {
|
|
|
|
prototype: DedicatedWorkerGlobalScope;
|
|
|
|
new(): DedicatedWorkerGlobalScope;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface ExtendableEvent extends Event {
|
|
|
|
waitUntil(f: Promise<any>): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var ExtendableEvent: {
|
|
|
|
prototype: ExtendableEvent;
|
|
|
|
new(type: string, eventInitDict?: ExtendableEventInit): ExtendableEvent;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface ExtendableMessageEvent extends ExtendableEvent {
|
|
|
|
readonly data: any;
|
|
|
|
readonly lastEventId: string;
|
|
|
|
readonly origin: string;
|
|
|
|
readonly ports: MessagePort[] | null;
|
|
|
|
readonly source: Client | ServiceWorker | MessagePort | null;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var ExtendableMessageEvent: {
|
|
|
|
prototype: ExtendableMessageEvent;
|
|
|
|
new(type: string, eventInitDict?: ExtendableMessageEventInit): ExtendableMessageEvent;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface FetchEvent extends ExtendableEvent {
|
|
|
|
readonly clientId: string | null;
|
|
|
|
readonly isReload: boolean;
|
|
|
|
readonly request: Request;
|
|
|
|
respondWith(r: Promise<Response>): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var FetchEvent: {
|
|
|
|
prototype: FetchEvent;
|
|
|
|
new(type: string, eventInitDict: FetchEventInit): FetchEvent;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface FileReaderSync {
|
|
|
|
readAsArrayBuffer(blob: Blob): any;
|
|
|
|
readAsBinaryString(blob: Blob): void;
|
|
|
|
readAsDataURL(blob: Blob): string;
|
|
|
|
readAsText(blob: Blob, encoding?: string): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var FileReaderSync: {
|
|
|
|
prototype: FileReaderSync;
|
|
|
|
new(): FileReaderSync;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface NotificationEvent extends ExtendableEvent {
|
|
|
|
readonly action: string;
|
|
|
|
readonly notification: Notification;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var NotificationEvent: {
|
|
|
|
prototype: NotificationEvent;
|
|
|
|
new(type: string, eventInitDict: NotificationEventInit): NotificationEvent;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface PushEvent extends ExtendableEvent {
|
|
|
|
readonly data: PushMessageData | null;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var PushEvent: {
|
|
|
|
prototype: PushEvent;
|
|
|
|
new(type: string, eventInitDict?: PushEventInit): PushEvent;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface PushMessageData {
|
|
|
|
arrayBuffer(): ArrayBuffer;
|
|
|
|
blob(): Blob;
|
|
|
|
json(): JSON;
|
|
|
|
text(): USVString;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var PushMessageData: {
|
|
|
|
prototype: PushMessageData;
|
|
|
|
new(): PushMessageData;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
|
|
|
|
"activate": ExtendableEvent;
|
|
|
|
"fetch": FetchEvent;
|
|
|
|
"install": ExtendableEvent;
|
|
|
|
"message": ExtendableMessageEvent;
|
|
|
|
"notificationclick": NotificationEvent;
|
|
|
|
"notificationclose": NotificationEvent;
|
|
|
|
"push": PushEvent;
|
|
|
|
"pushsubscriptionchange": ExtendableEvent;
|
|
|
|
"sync": SyncEvent;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
|
readonly clients: Clients;
|
|
|
|
onactivate: (this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any;
|
|
|
|
onfetch: (this: ServiceWorkerGlobalScope, ev: FetchEvent) => any;
|
|
|
|
oninstall: (this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any;
|
|
|
|
onmessage: (this: ServiceWorkerGlobalScope, ev: ExtendableMessageEvent) => any;
|
|
|
|
onnotificationclick: (this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any;
|
|
|
|
onnotificationclose: (this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any;
|
|
|
|
onpush: (this: ServiceWorkerGlobalScope, ev: PushEvent) => any;
|
|
|
|
onpushsubscriptionchange: (this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any;
|
|
|
|
onsync: (this: ServiceWorkerGlobalScope, ev: SyncEvent) => any;
|
|
|
|
readonly registration: ServiceWorkerRegistration;
|
|
|
|
skipWaiting(): Promise<void>;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2017-02-15 23:44:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var ServiceWorkerGlobalScope: {
|
|
|
|
prototype: ServiceWorkerGlobalScope;
|
|
|
|
new(): ServiceWorkerGlobalScope;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface SyncEvent extends ExtendableEvent {
|
|
|
|
readonly lastChance: boolean;
|
|
|
|
readonly tag: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var SyncEvent: {
|
|
|
|
prototype: SyncEvent;
|
|
|
|
new(type: string, init: SyncEventInit): SyncEvent;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface WindowClient extends Client {
|
|
|
|
readonly focused: boolean;
|
2017-04-26 23:38:47 +02:00
|
|
|
readonly visibilityState: VisibilityState;
|
2017-02-15 23:44:31 +01:00
|
|
|
focus(): Promise<WindowClient>;
|
|
|
|
navigate(url: USVString): Promise<WindowClient>;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var WindowClient: {
|
|
|
|
prototype: WindowClient;
|
|
|
|
new(): WindowClient;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-02-15 23:44:31 +01:00
|
|
|
|
|
|
|
interface WorkerGlobalScopeEventMap {
|
2016-12-15 22:46:39 +01:00
|
|
|
"error": ErrorEvent;
|
|
|
|
}
|
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface WorkerGlobalScope extends EventTarget, WorkerUtils, WindowConsole, GlobalFetch {
|
|
|
|
readonly caches: CacheStorage;
|
|
|
|
readonly isSecureContext: boolean;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly location: WorkerLocation;
|
2016-12-15 22:46:39 +01:00
|
|
|
onerror: (this: WorkerGlobalScope, ev: ErrorEvent) => any;
|
2017-02-15 23:44:31 +01:00
|
|
|
readonly performance: Performance;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly self: WorkerGlobalScope;
|
|
|
|
msWriteProfilerMark(profilerMarkName: string): void;
|
2017-04-26 23:38:47 +02:00
|
|
|
createImageBitmap(image: ImageBitmap | ImageData | Blob, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
|
|
createImageBitmap(image: ImageBitmap | ImageData | Blob, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var WorkerGlobalScope: {
|
|
|
|
prototype: WorkerGlobalScope;
|
|
|
|
new(): WorkerGlobalScope;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface WorkerLocation {
|
|
|
|
readonly hash: string;
|
|
|
|
readonly host: string;
|
|
|
|
readonly hostname: string;
|
|
|
|
readonly href: string;
|
2017-02-15 23:44:31 +01:00
|
|
|
readonly origin: string;
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly pathname: string;
|
|
|
|
readonly port: string;
|
|
|
|
readonly protocol: string;
|
|
|
|
readonly search: string;
|
|
|
|
toString(): string;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var WorkerLocation: {
|
|
|
|
prototype: WorkerLocation;
|
|
|
|
new(): WorkerLocation;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface WorkerNavigator extends Object, NavigatorID, NavigatorOnLine, NavigatorBeacon, NavigatorConcurrentHardware {
|
2016-12-15 07:03:00 +01:00
|
|
|
readonly hardwareConcurrency: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var WorkerNavigator: {
|
|
|
|
prototype: WorkerNavigator;
|
|
|
|
new(): WorkerNavigator;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2016-12-15 07:03:00 +01:00
|
|
|
|
|
|
|
interface WorkerUtils extends Object, WindowBase64 {
|
|
|
|
readonly indexedDB: IDBFactory;
|
|
|
|
readonly msIndexedDB: IDBFactory;
|
|
|
|
readonly navigator: WorkerNavigator;
|
|
|
|
clearImmediate(handle: number): void;
|
|
|
|
clearInterval(handle: number): void;
|
|
|
|
clearTimeout(handle: number): void;
|
|
|
|
importScripts(...urls: string[]): void;
|
|
|
|
setImmediate(handler: (...args: any[]) => void): number;
|
|
|
|
setImmediate(handler: any, ...args: any[]): number;
|
|
|
|
setInterval(handler: (...args: any[]) => void, timeout: number): number;
|
|
|
|
setInterval(handler: any, timeout?: any, ...args: any[]): number;
|
|
|
|
setTimeout(handler: (...args: any[]) => void, timeout: number): number;
|
|
|
|
setTimeout(handler: any, timeout?: any, ...args: any[]): number;
|
|
|
|
}
|
|
|
|
|
2017-09-26 22:51:27 +02:00
|
|
|
interface BroadcastChannel extends EventTarget {
|
|
|
|
readonly name: string;
|
|
|
|
onmessage: (ev: MessageEvent) => any;
|
|
|
|
onmessageerror: (ev: MessageEvent) => any;
|
|
|
|
close(): void;
|
|
|
|
postMessage(message: any): void;
|
2017-12-02 20:16:59 +01:00
|
|
|
addEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
removeEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2017-09-26 22:51:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
declare var BroadcastChannel: {
|
|
|
|
prototype: BroadcastChannel;
|
|
|
|
new(name: string): BroadcastChannel;
|
|
|
|
};
|
|
|
|
|
|
|
|
interface BroadcastChannelEventMap {
|
|
|
|
message: MessageEvent;
|
|
|
|
messageerror: MessageEvent;
|
|
|
|
}
|
|
|
|
|
2017-02-15 23:44:31 +01:00
|
|
|
interface ErrorEventInit {
|
|
|
|
message?: string;
|
|
|
|
filename?: string;
|
|
|
|
lineno?: number;
|
|
|
|
conlno?: number;
|
|
|
|
error?: any;
|
|
|
|
}
|
|
|
|
|
2017-04-26 23:38:47 +02:00
|
|
|
interface ImageBitmapOptions {
|
|
|
|
imageOrientation?: "none" | "flipY";
|
|
|
|
premultiplyAlpha?: "none" | "premultiply" | "default";
|
|
|
|
colorSpaceConversion?: "none" | "default";
|
|
|
|
resizeWidth?: number;
|
|
|
|
resizeHeight?: number;
|
|
|
|
resizeQuality?: "pixelated" | "low" | "medium" | "high";
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ImageBitmap {
|
|
|
|
readonly width: number;
|
|
|
|
readonly height: number;
|
|
|
|
close(): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface URLSearchParams {
|
|
|
|
/**
|
2017-08-01 00:54:41 +02:00
|
|
|
* Appends a specified key/value pair as a new search parameter.
|
|
|
|
*/
|
2017-04-26 23:38:47 +02:00
|
|
|
append(name: string, value: string): void;
|
|
|
|
/**
|
2017-08-01 00:54:41 +02:00
|
|
|
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
|
|
|
|
*/
|
2017-04-26 23:38:47 +02:00
|
|
|
delete(name: string): void;
|
|
|
|
/**
|
2017-08-01 00:54:41 +02:00
|
|
|
* Returns the first value associated to the given search parameter.
|
|
|
|
*/
|
2017-04-26 23:38:47 +02:00
|
|
|
get(name: string): string | null;
|
|
|
|
/**
|
2017-08-01 00:54:41 +02:00
|
|
|
* Returns all the values association with a given search parameter.
|
|
|
|
*/
|
2017-04-26 23:38:47 +02:00
|
|
|
getAll(name: string): string[];
|
|
|
|
/**
|
2017-08-01 00:54:41 +02:00
|
|
|
* Returns a Boolean indicating if such a search parameter exists.
|
|
|
|
*/
|
2017-04-26 23:38:47 +02:00
|
|
|
has(name: string): boolean;
|
|
|
|
/**
|
2017-08-01 00:54:41 +02:00
|
|
|
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
|
|
|
|
*/
|
2017-04-26 23:38:47 +02:00
|
|
|
set(name: string, value: string): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var URLSearchParams: {
|
|
|
|
prototype: URLSearchParams;
|
|
|
|
/**
|
2017-08-01 00:54:41 +02:00
|
|
|
* Constructor returning a URLSearchParams object.
|
|
|
|
*/
|
2017-04-26 23:38:47 +02:00
|
|
|
new (init?: string | URLSearchParams): URLSearchParams;
|
2017-08-01 00:54:41 +02:00
|
|
|
};
|
2017-04-26 23:38:47 +02:00
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
interface BlobPropertyBag {
|
|
|
|
type?: string;
|
|
|
|
endings?: string;
|
|
|
|
}
|
|
|
|
|
2017-09-26 22:51:27 +02:00
|
|
|
interface FilePropertyBag extends BlobPropertyBag {
|
2016-12-15 07:03:00 +01:00
|
|
|
lastModified?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface EventListenerObject {
|
|
|
|
handleEvent(evt: Event): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ProgressEventInit extends EventInit {
|
|
|
|
lengthComputable?: boolean;
|
|
|
|
loaded?: number;
|
|
|
|
total?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IDBArrayKey extends Array<IDBValidKey> {
|
|
|
|
}
|
|
|
|
|
|
|
|
interface RsaKeyGenParams extends Algorithm {
|
|
|
|
modulusLength: number;
|
|
|
|
publicExponent: Uint8Array;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface RsaHashedKeyGenParams extends RsaKeyGenParams {
|
|
|
|
hash: AlgorithmIdentifier;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface RsaKeyAlgorithm extends KeyAlgorithm {
|
|
|
|
modulusLength: number;
|
|
|
|
publicExponent: Uint8Array;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
|
|
|
|
hash: AlgorithmIdentifier;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface RsaHashedImportParams {
|
|
|
|
hash: AlgorithmIdentifier;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface RsaPssParams {
|
|
|
|
saltLength: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface RsaOaepParams extends Algorithm {
|
|
|
|
label?: BufferSource;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface EcdsaParams extends Algorithm {
|
|
|
|
hash: AlgorithmIdentifier;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface EcKeyGenParams extends Algorithm {
|
|
|
|
namedCurve: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface EcKeyAlgorithm extends KeyAlgorithm {
|
|
|
|
typedCurve: string;
|
|
|
|
}
|
|
|
|
|
2017-12-02 20:16:59 +01:00
|
|
|
interface EcKeyImportParams extends Algorithm {
|
2016-12-15 07:03:00 +01:00
|
|
|
namedCurve: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface EcdhKeyDeriveParams extends Algorithm {
|
|
|
|
public: CryptoKey;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface AesCtrParams extends Algorithm {
|
|
|
|
counter: BufferSource;
|
|
|
|
length: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface AesKeyAlgorithm extends KeyAlgorithm {
|
|
|
|
length: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface AesKeyGenParams extends Algorithm {
|
|
|
|
length: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface AesDerivedKeyParams extends Algorithm {
|
|
|
|
length: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface AesCbcParams extends Algorithm {
|
|
|
|
iv: BufferSource;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface AesCmacParams extends Algorithm {
|
|
|
|
length: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface AesGcmParams extends Algorithm {
|
|
|
|
iv: BufferSource;
|
|
|
|
additionalData?: BufferSource;
|
|
|
|
tagLength?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface AesCfbParams extends Algorithm {
|
|
|
|
iv: BufferSource;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface HmacImportParams extends Algorithm {
|
|
|
|
hash?: AlgorithmIdentifier;
|
|
|
|
length?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface HmacKeyAlgorithm extends KeyAlgorithm {
|
|
|
|
hash: AlgorithmIdentifier;
|
|
|
|
length: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface HmacKeyGenParams extends Algorithm {
|
|
|
|
hash: AlgorithmIdentifier;
|
|
|
|
length?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface DhKeyGenParams extends Algorithm {
|
|
|
|
prime: Uint8Array;
|
|
|
|
generator: Uint8Array;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface DhKeyAlgorithm extends KeyAlgorithm {
|
|
|
|
prime: Uint8Array;
|
|
|
|
generator: Uint8Array;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface DhKeyDeriveParams extends Algorithm {
|
|
|
|
public: CryptoKey;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface DhImportKeyParams extends Algorithm {
|
|
|
|
prime: Uint8Array;
|
|
|
|
generator: Uint8Array;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ConcatParams extends Algorithm {
|
|
|
|
hash?: AlgorithmIdentifier;
|
|
|
|
algorithmId: Uint8Array;
|
|
|
|
partyUInfo: Uint8Array;
|
|
|
|
partyVInfo: Uint8Array;
|
|
|
|
publicInfo?: Uint8Array;
|
|
|
|
privateInfo?: Uint8Array;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface HkdfCtrParams extends Algorithm {
|
|
|
|
hash: AlgorithmIdentifier;
|
|
|
|
label: BufferSource;
|
|
|
|
context: BufferSource;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface Pbkdf2Params extends Algorithm {
|
|
|
|
salt: BufferSource;
|
|
|
|
iterations: number;
|
|
|
|
hash: AlgorithmIdentifier;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface RsaOtherPrimesInfo {
|
|
|
|
r: string;
|
|
|
|
d: string;
|
|
|
|
t: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface JsonWebKey {
|
|
|
|
kty: string;
|
|
|
|
use?: string;
|
|
|
|
key_ops?: string[];
|
|
|
|
alg?: string;
|
|
|
|
kid?: string;
|
|
|
|
x5u?: string;
|
|
|
|
x5c?: string;
|
|
|
|
x5t?: string;
|
|
|
|
ext?: boolean;
|
|
|
|
crv?: string;
|
|
|
|
x?: string;
|
|
|
|
y?: string;
|
|
|
|
d?: string;
|
|
|
|
n?: string;
|
|
|
|
e?: string;
|
|
|
|
p?: string;
|
|
|
|
q?: string;
|
|
|
|
dp?: string;
|
|
|
|
dq?: string;
|
|
|
|
qi?: string;
|
|
|
|
oth?: RsaOtherPrimesInfo[];
|
|
|
|
k?: string;
|
|
|
|
}
|
|
|
|
|
2017-04-26 23:38:47 +02:00
|
|
|
interface EventListenerOptions {
|
|
|
|
capture?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface AddEventListenerOptions extends EventListenerOptions {
|
|
|
|
passive?: boolean;
|
|
|
|
once?: boolean;
|
|
|
|
}
|
|
|
|
|
2018-02-21 18:12:48 +01:00
|
|
|
interface AbortController {
|
|
|
|
readonly signal: AbortSignal;
|
|
|
|
abort(): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var AbortController: {
|
|
|
|
prototype: AbortController;
|
|
|
|
new(): AbortController;
|
|
|
|
};
|
|
|
|
|
|
|
|
interface AbortSignal extends EventTarget {
|
|
|
|
readonly aborted: boolean;
|
|
|
|
onabort: (ev: Event) => any;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface EventSource extends EventTarget {
|
|
|
|
readonly url: string;
|
|
|
|
readonly withCredentials: boolean;
|
|
|
|
readonly CONNECTING: number;
|
|
|
|
readonly OPEN: number;
|
|
|
|
readonly CLOSED: number;
|
|
|
|
readonly readyState: number;
|
|
|
|
onopen: (evt: MessageEvent) => any;
|
|
|
|
onmessage: (evt: MessageEvent) => any;
|
|
|
|
onerror: (evt: MessageEvent) => any;
|
|
|
|
close(): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare var EventSource: {
|
|
|
|
prototype: EventSource;
|
|
|
|
new(url: string, eventSourceInitDict?: EventSourceInit): EventSource;
|
|
|
|
};
|
|
|
|
|
|
|
|
interface EventSourceInit {
|
|
|
|
readonly withCredentials: boolean;
|
|
|
|
}
|
|
|
|
|
2016-12-15 07:03:00 +01:00
|
|
|
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
|
|
|
|
|
2017-08-01 00:54:41 +02:00
|
|
|
interface DecodeErrorCallback {
|
|
|
|
(error: DOMException): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
|
|
|
interface DecodeSuccessCallback {
|
|
|
|
(decodedData: AudioBuffer): void;
|
|
|
|
}
|
2017-08-01 00:54:41 +02:00
|
|
|
interface ErrorEventHandler {
|
|
|
|
(message: string, filename?: string, lineno?: number, colno?: number, error?: Error): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
}
|
2017-02-15 23:44:31 +01:00
|
|
|
interface ForEachCallback {
|
2017-04-26 23:38:47 +02:00
|
|
|
(keyId: any, status: MediaKeyStatus): void;
|
2017-02-15 23:44:31 +01:00
|
|
|
}
|
2017-08-01 00:54:41 +02:00
|
|
|
interface FunctionStringCallback {
|
|
|
|
(data: string): void;
|
|
|
|
}
|
2017-02-15 23:44:31 +01:00
|
|
|
interface NotificationPermissionCallback {
|
2017-04-26 23:38:47 +02:00
|
|
|
(permission: NotificationPermission): void;
|
2017-02-15 23:44:31 +01:00
|
|
|
}
|
2017-08-01 00:54:41 +02:00
|
|
|
interface PositionCallback {
|
|
|
|
(position: Position): void;
|
|
|
|
}
|
|
|
|
interface PositionErrorCallback {
|
|
|
|
(error: PositionError): void;
|
|
|
|
}
|
2017-02-15 23:44:31 +01:00
|
|
|
declare var onmessage: (this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any;
|
|
|
|
declare function close(): void;
|
|
|
|
declare function postMessage(message: any, transfer?: any[]): void;
|
|
|
|
declare var caches: CacheStorage;
|
|
|
|
declare var isSecureContext: boolean;
|
2016-12-15 07:03:00 +01:00
|
|
|
declare var location: WorkerLocation;
|
2017-02-15 23:44:31 +01:00
|
|
|
declare var onerror: (this: DedicatedWorkerGlobalScope, ev: ErrorEvent) => any;
|
|
|
|
declare var performance: Performance;
|
2016-12-15 07:03:00 +01:00
|
|
|
declare var self: WorkerGlobalScope;
|
|
|
|
declare function msWriteProfilerMark(profilerMarkName: string): void;
|
2017-04-26 23:38:47 +02:00
|
|
|
declare function createImageBitmap(image: ImageBitmap | ImageData | Blob, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
|
|
declare function createImageBitmap(image: ImageBitmap | ImageData | Blob, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
2016-12-15 07:03:00 +01:00
|
|
|
declare function dispatchEvent(evt: Event): boolean;
|
|
|
|
declare var indexedDB: IDBFactory;
|
|
|
|
declare var msIndexedDB: IDBFactory;
|
|
|
|
declare var navigator: WorkerNavigator;
|
|
|
|
declare function clearImmediate(handle: number): void;
|
|
|
|
declare function clearInterval(handle: number): void;
|
|
|
|
declare function clearTimeout(handle: number): void;
|
|
|
|
declare function importScripts(...urls: string[]): void;
|
|
|
|
declare function setImmediate(handler: (...args: any[]) => void): number;
|
|
|
|
declare function setImmediate(handler: any, ...args: any[]): number;
|
|
|
|
declare function setInterval(handler: (...args: any[]) => void, timeout: number): number;
|
|
|
|
declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
|
|
|
|
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): number;
|
|
|
|
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;
|
2017-02-15 23:44:31 +01:00
|
|
|
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
|
|
declare function dispatchEvent(evt: Event): boolean;
|
2017-12-02 20:16:59 +01:00
|
|
|
declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
|
|
declare function removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
|
|
declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
2016-12-15 07:03:00 +01:00
|
|
|
type AlgorithmIdentifier = string | Algorithm;
|
2018-02-21 18:12:48 +01:00
|
|
|
type BodyInit = Blob | BufferSource | FormData | string;
|
2016-12-15 07:03:00 +01:00
|
|
|
type IDBKeyPath = string;
|
2017-02-15 23:44:31 +01:00
|
|
|
type RequestInfo = Request | string;
|
|
|
|
type USVString = string;
|
2016-12-15 07:03:00 +01:00
|
|
|
type IDBValidKey = number | string | Date | IDBArrayKey;
|
2017-04-26 23:38:47 +02:00
|
|
|
type BufferSource = ArrayBuffer | ArrayBufferView;
|
|
|
|
type FormDataEntryValue = string | File;
|
2017-12-02 20:16:59 +01:00
|
|
|
type HeadersInit = Headers | string[][] | { [key: string]: string };
|
2017-04-26 23:38:47 +02:00
|
|
|
type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
|
|
|
|
type IDBRequestReadyState = "pending" | "done";
|
|
|
|
type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
|
|
|
|
type MediaKeyStatus = "usable" | "expired" | "output-downscaled" | "output-not-allowed" | "status-pending" | "internal-error";
|
|
|
|
type NotificationDirection = "auto" | "ltr" | "rtl";
|
|
|
|
type NotificationPermission = "default" | "denied" | "granted";
|
|
|
|
type PushEncryptionKeyName = "p256dh" | "auth";
|
|
|
|
type PushPermissionState = "granted" | "denied" | "prompt";
|
|
|
|
type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin-only" | "origin-when-cross-origin" | "unsafe-url";
|
|
|
|
type RequestCache = "default" | "no-store" | "reload" | "no-cache" | "force-cache";
|
|
|
|
type RequestCredentials = "omit" | "same-origin" | "include";
|
|
|
|
type RequestDestination = "" | "document" | "sharedworker" | "subresource" | "unknown" | "worker";
|
|
|
|
type RequestMode = "navigate" | "same-origin" | "no-cors" | "cors";
|
|
|
|
type RequestRedirect = "follow" | "error" | "manual";
|
|
|
|
type RequestType = "" | "audio" | "font" | "image" | "script" | "style" | "track" | "video";
|
|
|
|
type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
|
|
|
|
type ServiceWorkerState = "installing" | "installed" | "activating" | "activated" | "redundant";
|
|
|
|
type VisibilityState = "hidden" | "visible" | "prerender" | "unloaded";
|
|
|
|
type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
|
|
|
|
type ClientType = "window" | "worker" | "sharedworker" | "all";
|
|
|
|
type FrameType = "auxiliary" | "top-level" | "nested" | "none";
|