mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into NumberFormatOptions-notation
This commit is contained in:
Vendored
+78
-38
@@ -805,8 +805,8 @@ interface MediaTrackSupportedConstraints {
|
||||
width?: boolean;
|
||||
}
|
||||
|
||||
interface MessageEventInit extends EventInit {
|
||||
data?: any;
|
||||
interface MessageEventInit<T = any> extends EventInit {
|
||||
data?: T;
|
||||
lastEventId?: string;
|
||||
origin?: string;
|
||||
ports?: MessagePort[];
|
||||
@@ -2958,6 +2958,11 @@ interface CSSStyleDeclaration {
|
||||
overflowWrap: string;
|
||||
overflowX: string;
|
||||
overflowY: string;
|
||||
overscrollBehavior: string;
|
||||
overscrollBehaviorBlock: string;
|
||||
overscrollBehaviorInline: string;
|
||||
overscrollBehaviorX: string;
|
||||
overscrollBehaviorY: string;
|
||||
padding: string;
|
||||
paddingBlockEnd: string;
|
||||
paddingBlockStart: string;
|
||||
@@ -3918,7 +3923,16 @@ declare var DOMMatrixReadOnly: {
|
||||
|
||||
/** Provides the ability to parse XML or HTML source code from a string into a DOM Document. */
|
||||
interface DOMParser {
|
||||
parseFromString(str: string, type: SupportedType): Document;
|
||||
/**
|
||||
* Parses string using either the HTML or XML parser, according to type, and returns the resulting Document. type can be "text/html" (which will invoke the HTML parser), or any of "text/xml", "application/xml", "application/xhtml+xml", or "image/svg+xml" (which will invoke the XML parser).
|
||||
*
|
||||
* For the XML parser, if string cannot be parsed, then the returned Document will contain elements describing the resulting error.
|
||||
*
|
||||
* Note that script elements are not evaluated during parsing, and the resulting document's encoding will always be UTF-8.
|
||||
*
|
||||
* Values other than the above for type will cause a TypeError exception to be thrown.
|
||||
*/
|
||||
parseFromString(string: string, type: DOMParserSupportedType): Document;
|
||||
}
|
||||
|
||||
declare var DOMParser: {
|
||||
@@ -4529,10 +4543,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad
|
||||
*/
|
||||
onreadystatechange: ((this: Document, ev: Event) => any) | null;
|
||||
onvisibilitychange: ((this: Document, ev: Event) => any) | null;
|
||||
/**
|
||||
* Returns document's origin.
|
||||
*/
|
||||
readonly origin: string;
|
||||
readonly ownerDocument: null;
|
||||
/**
|
||||
* Return an HTMLCollection of the embed elements in the Document.
|
||||
@@ -5065,7 +5075,7 @@ interface ElementEventMap {
|
||||
}
|
||||
|
||||
/** Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element. */
|
||||
interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slotable {
|
||||
interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slottable {
|
||||
readonly assignedSlot: HTMLSlotElement | null;
|
||||
readonly attributes: NamedNodeMap;
|
||||
/**
|
||||
@@ -5232,6 +5242,7 @@ interface ElementCSSInlineStyle {
|
||||
|
||||
interface ElementContentEditable {
|
||||
contentEditable: string;
|
||||
enterKeyHint: string;
|
||||
inputMode: string;
|
||||
readonly isContentEditable: boolean;
|
||||
}
|
||||
@@ -7064,6 +7075,7 @@ interface HTMLImageElement extends HTMLElement {
|
||||
* Sets or retrieves whether the image is a server-side image map.
|
||||
*/
|
||||
isMap: boolean;
|
||||
loading: string;
|
||||
/**
|
||||
* Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.
|
||||
*/
|
||||
@@ -10384,11 +10396,11 @@ declare var MessageChannel: {
|
||||
};
|
||||
|
||||
/** A message received by a target object. */
|
||||
interface MessageEvent extends Event {
|
||||
interface MessageEvent<T = any> extends Event {
|
||||
/**
|
||||
* Returns the data of the message.
|
||||
*/
|
||||
readonly data: any;
|
||||
readonly data: T;
|
||||
/**
|
||||
* Returns the last event ID string, for server-sent events.
|
||||
*/
|
||||
@@ -10409,7 +10421,7 @@ interface MessageEvent extends Event {
|
||||
|
||||
declare var MessageEvent: {
|
||||
prototype: MessageEvent;
|
||||
new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
|
||||
new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>;
|
||||
};
|
||||
|
||||
interface MessagePortEventMap {
|
||||
@@ -14337,8 +14349,8 @@ interface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewB
|
||||
getComputedStyle(elt: Element, pseudoElt?: string | null): CSSStyleDeclaration;
|
||||
getCurrentTime(): number;
|
||||
getElementById(elementId: string): Element;
|
||||
getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
|
||||
getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
|
||||
getEnclosureList(rect: SVGRect, referenceElement: SVGElement | null): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
|
||||
getIntersectionList(rect: SVGRect, referenceElement: SVGElement | null): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
|
||||
pauseAnimations(): void;
|
||||
setCurrentTime(seconds: number): void;
|
||||
/** @deprecated */
|
||||
@@ -14961,7 +14973,7 @@ declare var SharedWorker: {
|
||||
new(scriptURL: string, options?: string | WorkerOptions): SharedWorker;
|
||||
};
|
||||
|
||||
interface Slotable {
|
||||
interface Slottable {
|
||||
readonly assignedSlot: HTMLSlotElement | null;
|
||||
}
|
||||
|
||||
@@ -15049,7 +15061,7 @@ interface SpeechRecognitionEventMap {
|
||||
"audioend": Event;
|
||||
"audiostart": Event;
|
||||
"end": Event;
|
||||
"error": Event;
|
||||
"error": ErrorEvent;
|
||||
"nomatch": SpeechRecognitionEvent;
|
||||
"result": SpeechRecognitionEvent;
|
||||
"soundend": Event;
|
||||
@@ -15068,7 +15080,7 @@ interface SpeechRecognition extends EventTarget {
|
||||
onaudioend: ((this: SpeechRecognition, ev: Event) => any) | null;
|
||||
onaudiostart: ((this: SpeechRecognition, ev: Event) => any) | null;
|
||||
onend: ((this: SpeechRecognition, ev: Event) => any) | null;
|
||||
onerror: ((this: SpeechRecognition, ev: Event) => any) | null;
|
||||
onerror: ((this: SpeechRecognition, ev: ErrorEvent) => any) | null;
|
||||
onnomatch: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
|
||||
onresult: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
|
||||
onsoundend: ((this: SpeechRecognition, ev: Event) => any) | null;
|
||||
@@ -15366,24 +15378,24 @@ declare var StyleSheetList: {
|
||||
|
||||
/** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */
|
||||
interface SubtleCrypto {
|
||||
decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
|
||||
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike<ArrayBuffer>;
|
||||
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
|
||||
digest(algorithm: AlgorithmIdentifier, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
|
||||
encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
|
||||
exportKey(format: "jwk", key: CryptoKey): PromiseLike<JsonWebKey>;
|
||||
exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): PromiseLike<ArrayBuffer>;
|
||||
exportKey(format: string, key: CryptoKey): PromiseLike<JsonWebKey | ArrayBuffer>;
|
||||
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKeyPair | CryptoKey>;
|
||||
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKeyPair>;
|
||||
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
|
||||
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
|
||||
importKey(format: "raw" | "pkcs8" | "spki", keyData: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
|
||||
importKey(format: string, keyData: JsonWebKey | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
|
||||
sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
|
||||
unwrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, wrappedKey: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
|
||||
verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<boolean>;
|
||||
wrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams): PromiseLike<ArrayBuffer>;
|
||||
decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>;
|
||||
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
|
||||
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
||||
digest(algorithm: AlgorithmIdentifier, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>;
|
||||
encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>;
|
||||
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
|
||||
exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): Promise<ArrayBuffer>;
|
||||
exportKey(format: string, key: CryptoKey): Promise<JsonWebKey | ArrayBuffer>;
|
||||
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
|
||||
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
|
||||
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
||||
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
||||
importKey(format: "raw" | "pkcs8" | "spki", keyData: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
||||
importKey(format: string, keyData: JsonWebKey | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
||||
sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>;
|
||||
unwrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, wrappedKey: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
||||
verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<boolean>;
|
||||
wrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams): Promise<ArrayBuffer>;
|
||||
}
|
||||
|
||||
declare var SubtleCrypto: {
|
||||
@@ -15403,7 +15415,7 @@ declare var SyncManager: {
|
||||
};
|
||||
|
||||
/** The textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children. */
|
||||
interface Text extends CharacterData, Slotable {
|
||||
interface Text extends CharacterData, Slottable {
|
||||
readonly assignedSlot: HTMLSlotElement | null;
|
||||
/**
|
||||
* Returns the combined data of all direct Text node siblings.
|
||||
@@ -16146,6 +16158,32 @@ declare var VideoPlaybackQuality: {
|
||||
new(): VideoPlaybackQuality;
|
||||
};
|
||||
|
||||
interface VisualViewportEventMap {
|
||||
"resize": UIEvent;
|
||||
"scroll": Event;
|
||||
}
|
||||
|
||||
interface VisualViewport extends EventTarget {
|
||||
readonly height: number;
|
||||
readonly offsetLeft: number;
|
||||
readonly offsetTop: number;
|
||||
onresize: ((this: VisualViewport, ev: UIEvent) => any) | null;
|
||||
onscroll: ((this: VisualViewport, ev: Event) => any) | null;
|
||||
readonly pageLeft: number;
|
||||
readonly pageTop: number;
|
||||
readonly scale: number;
|
||||
readonly width: number;
|
||||
addEventListener<K extends keyof VisualViewportEventMap>(type: K, listener: (this: VisualViewport, ev: VisualViewportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
||||
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
||||
removeEventListener<K extends keyof VisualViewportEventMap>(type: K, listener: (this: VisualViewport, ev: VisualViewportEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
||||
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
||||
}
|
||||
|
||||
declare var VisualViewport: {
|
||||
prototype: VisualViewport;
|
||||
new(): VisualViewport;
|
||||
};
|
||||
|
||||
interface WEBGL_color_buffer_float {
|
||||
readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
|
||||
readonly RGBA32F_EXT: GLenum;
|
||||
@@ -18454,6 +18492,7 @@ interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandler
|
||||
readonly styleMedia: StyleMedia;
|
||||
readonly toolbar: BarProp;
|
||||
readonly top: Window;
|
||||
readonly visualViewport: VisualViewport;
|
||||
readonly window: Window & typeof globalThis;
|
||||
alert(message?: any): void;
|
||||
blur(): void;
|
||||
@@ -18477,7 +18516,7 @@ interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandler
|
||||
/** @deprecated */
|
||||
releaseEvents(): void;
|
||||
resizeBy(x: number, y: number): void;
|
||||
resizeTo(x: number, y: number): void;
|
||||
resizeTo(width: number, height: number): void;
|
||||
scroll(options?: ScrollToOptions): void;
|
||||
scroll(x: number, y: number): void;
|
||||
scrollBy(options?: ScrollToOptions): void;
|
||||
@@ -19482,6 +19521,7 @@ declare var statusbar: BarProp;
|
||||
declare var styleMedia: StyleMedia;
|
||||
declare var toolbar: BarProp;
|
||||
declare var top: Window;
|
||||
declare var visualViewport: VisualViewport;
|
||||
declare var window: Window & typeof globalThis;
|
||||
declare function alert(message?: any): void;
|
||||
declare function blur(): void;
|
||||
@@ -19505,7 +19545,7 @@ declare function prompt(message?: string, _default?: string): string | null;
|
||||
/** @deprecated */
|
||||
declare function releaseEvents(): void;
|
||||
declare function resizeBy(x: number, y: number): void;
|
||||
declare function resizeTo(x: number, y: number): void;
|
||||
declare function resizeTo(width: number, height: number): void;
|
||||
declare function scroll(options?: ScrollToOptions): void;
|
||||
declare function scroll(x: number, y: number): void;
|
||||
declare function scrollBy(options?: ScrollToOptions): void;
|
||||
@@ -19916,6 +19956,7 @@ type ColorSpaceConversion = "default" | "none";
|
||||
type CompositeOperation = "accumulate" | "add" | "replace";
|
||||
type CompositeOperationOrAuto = "accumulate" | "add" | "auto" | "replace";
|
||||
type CredentialMediationRequirement = "optional" | "required" | "silent";
|
||||
type DOMParserSupportedType = "application/xhtml+xml" | "application/xml" | "image/svg+xml" | "text/html" | "text/xml";
|
||||
type DirectionSetting = "" | "lr" | "rl";
|
||||
type DisplayCaptureSurfaceType = "application" | "browser" | "monitor" | "window";
|
||||
type DistanceModelType = "exponential" | "inverse" | "linear";
|
||||
@@ -20016,7 +20057,6 @@ type ServiceWorkerState = "activated" | "activating" | "installed" | "installing
|
||||
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
|
||||
type ShadowRootMode = "closed" | "open";
|
||||
type SpeechSynthesisErrorCode = "audio-busy" | "audio-hardware" | "canceled" | "interrupted" | "invalid-argument" | "language-unavailable" | "network" | "not-allowed" | "synthesis-failed" | "synthesis-unavailable" | "text-too-long" | "voice-unavailable";
|
||||
type SupportedType = "application/xhtml+xml" | "application/xml" | "image/svg+xml" | "text/html" | "text/xml";
|
||||
type TextTrackKind = "captions" | "chapters" | "descriptions" | "metadata" | "subtitles";
|
||||
type TextTrackMode = "disabled" | "hidden" | "showing";
|
||||
type TouchType = "direct" | "stylus";
|
||||
|
||||
Vendored
+14
-23
@@ -42,15 +42,6 @@ interface Array<T> {
|
||||
* @param end If not specified, length of the this object is used as its default value.
|
||||
*/
|
||||
copyWithin(target: number, start: number, end?: number): this;
|
||||
|
||||
/**
|
||||
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
|
||||
* @param start The zero-based location in the array from which to start removing elements.
|
||||
* @param deleteCount The number of elements to remove. If deleteCount is omitted, or if its value is equal to or larger
|
||||
* than array.length - start (that is, if it is equal to or greater than the number of elements left in the array,
|
||||
* starting at start), then all the elements from start to the end of the array will be deleted.
|
||||
*/
|
||||
splice(start: number, deleteCount?: number): T[];
|
||||
}
|
||||
|
||||
interface ArrayConstructor {
|
||||
@@ -443,48 +434,48 @@ interface String {
|
||||
startsWith(searchString: string, position?: number): boolean;
|
||||
|
||||
/**
|
||||
* Returns an <a> HTML anchor element and sets the name attribute to the text value
|
||||
* Returns an `<a>` HTML anchor element and sets the name attribute to the text value
|
||||
* @param name
|
||||
*/
|
||||
anchor(name: string): string;
|
||||
|
||||
/** Returns a <big> HTML element */
|
||||
/** Returns a `<big>` HTML element */
|
||||
big(): string;
|
||||
|
||||
/** Returns a <blink> HTML element */
|
||||
/** Returns a `<blink>` HTML element */
|
||||
blink(): string;
|
||||
|
||||
/** Returns a <b> HTML element */
|
||||
/** Returns a `<b>` HTML element */
|
||||
bold(): string;
|
||||
|
||||
/** Returns a <tt> HTML element */
|
||||
/** Returns a `<tt>` HTML element */
|
||||
fixed(): string;
|
||||
|
||||
/** Returns a <font> HTML element and sets the color attribute value */
|
||||
/** Returns a `<font>` HTML element and sets the color attribute value */
|
||||
fontcolor(color: string): string;
|
||||
|
||||
/** Returns a <font> HTML element and sets the size attribute value */
|
||||
/** Returns a `<font>` HTML element and sets the size attribute value */
|
||||
fontsize(size: number): string;
|
||||
|
||||
/** Returns a <font> HTML element and sets the size attribute value */
|
||||
/** Returns a `<font>` HTML element and sets the size attribute value */
|
||||
fontsize(size: string): string;
|
||||
|
||||
/** Returns an <i> HTML element */
|
||||
/** Returns an `<i>` HTML element */
|
||||
italics(): string;
|
||||
|
||||
/** Returns an <a> HTML element and sets the href attribute value */
|
||||
/** Returns an `<a>` HTML element and sets the href attribute value */
|
||||
link(url: string): string;
|
||||
|
||||
/** Returns a <small> HTML element */
|
||||
/** Returns a `<small>` HTML element */
|
||||
small(): string;
|
||||
|
||||
/** Returns a <strike> HTML element */
|
||||
/** Returns a `<strike>` HTML element */
|
||||
strike(): string;
|
||||
|
||||
/** Returns a <sub> HTML element */
|
||||
/** Returns a `<sub>` HTML element */
|
||||
sub(): string;
|
||||
|
||||
/** Returns a <sup> HTML element */
|
||||
/** Returns a `<sup>` HTML element */
|
||||
sup(): string;
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -254,7 +254,7 @@ interface Int8Array {
|
||||
}
|
||||
|
||||
interface Uint8Array {
|
||||
readonly [Symbol.toStringTag]: "UInt8Array";
|
||||
readonly [Symbol.toStringTag]: "Uint8Array";
|
||||
}
|
||||
|
||||
interface Uint8ClampedArray {
|
||||
|
||||
Vendored
+4
-1
@@ -102,8 +102,11 @@ interface Atomics {
|
||||
/**
|
||||
* Wakes up sleeping agents that are waiting on the given index of the array, returning the
|
||||
* number of agents that were awoken.
|
||||
* @param typedArray A shared Int32Array.
|
||||
* @param index The position in the typedArray to wake up on.
|
||||
* @param count The number of sleeping agents to notify. Defaults to +Infinity.
|
||||
*/
|
||||
notify(typedArray: Int32Array, index: number, count: number): number;
|
||||
notify(typedArray: Int32Array, index: number, count?: number): number;
|
||||
|
||||
/**
|
||||
* Stores the bitwise XOR of a value with the value at the given position in the array,
|
||||
|
||||
Vendored
+16
-154
@@ -1,3 +1,10 @@
|
||||
type FlatArray<Arr, Depth extends number> = {
|
||||
"done": Arr,
|
||||
"recur": Arr extends ReadonlyArray<infer InnerArr>
|
||||
? FlatArray<InnerArr, [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]>
|
||||
: Arr
|
||||
}[Depth extends -1 ? "done" : "recur"];
|
||||
|
||||
interface ReadonlyArray<T> {
|
||||
|
||||
/**
|
||||
@@ -22,95 +29,11 @@ interface ReadonlyArray<T> {
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(this:
|
||||
ReadonlyArray<U[][][][]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<U[][][]>> |
|
||||
ReadonlyArray<ReadonlyArray<U[][]>[]> |
|
||||
ReadonlyArray<ReadonlyArray<U[]>[][]> |
|
||||
ReadonlyArray<ReadonlyArray<U>[][][]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U[][]>>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U>[][]>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>[][]> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U>[]>[]> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U[]>>[]> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U[]>[]>> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U[]>>>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>[]>>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>[]>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>>[]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>>>>,
|
||||
depth: 4): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(this:
|
||||
ReadonlyArray<U[][][]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<U>[][]> |
|
||||
ReadonlyArray<ReadonlyArray<U[]>[]> |
|
||||
ReadonlyArray<ReadonlyArray<U[][]>> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U[]>>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U>[]>> |
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>[]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>>>,
|
||||
depth: 3): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(this:
|
||||
ReadonlyArray<U[][]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<U[]>> |
|
||||
ReadonlyArray<ReadonlyArray<U>[]> |
|
||||
|
||||
ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>>,
|
||||
depth: 2): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(this:
|
||||
ReadonlyArray<U[]> |
|
||||
ReadonlyArray<ReadonlyArray<U>>,
|
||||
depth?: 1
|
||||
): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(this:
|
||||
ReadonlyArray<U>,
|
||||
depth: 0
|
||||
): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth. If no depth is provided, flat method defaults to the depth of 1.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(depth?: number): any[];
|
||||
}
|
||||
flat<A, D extends number = 1>(
|
||||
this: A,
|
||||
depth?: D
|
||||
): FlatArray<A, D>[]
|
||||
}
|
||||
|
||||
interface Array<T> {
|
||||
|
||||
@@ -135,69 +58,8 @@ interface Array<T> {
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(this: U[][][][][][][][], depth: 7): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(this: U[][][][][][][], depth: 6): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(this: U[][][][][][], depth: 5): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(this: U[][][][][], depth: 4): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(this: U[][][][], depth: 3): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(this: U[][][], depth: 2): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(this: U[][], depth?: 1): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(this: U[], depth: 0): U[];
|
||||
|
||||
/**
|
||||
* Returns a new array with all sub-array elements concatenated into it recursively up to the
|
||||
* specified depth. If no depth is provided, flat method defaults to the depth of 1.
|
||||
*
|
||||
* @param depth The maximum recursion depth
|
||||
*/
|
||||
flat<U>(depth?: number): any[];
|
||||
flat<A, D extends number = 1>(
|
||||
this: A,
|
||||
depth?: D
|
||||
): FlatArray<A, D>[]
|
||||
}
|
||||
|
||||
Vendored
+1
@@ -3,3 +3,4 @@
|
||||
/// <reference lib="es2020.promise" />
|
||||
/// <reference lib="es2020.string" />
|
||||
/// <reference lib="es2020.symbol.wellknown" />
|
||||
/// <reference lib="es2020.intl" />
|
||||
|
||||
Vendored
+264
@@ -0,0 +1,264 @@
|
||||
declare namespace Intl {
|
||||
|
||||
/**
|
||||
* [BCP 47 language tag](http://tools.ietf.org/html/rfc5646) definition.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
|
||||
*
|
||||
* [Wikipedia](https://en.wikipedia.org/wiki/IETF_language_tag).
|
||||
*/
|
||||
type BCP47LanguageTag = string;
|
||||
|
||||
/**
|
||||
* Unit to use in the relative time internationalized message.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters).
|
||||
*
|
||||
* [Specification](https://tc39.es/ecma402/#sec-singularrelativetimeunit).
|
||||
*/
|
||||
type RelativeTimeFormatUnit =
|
||||
| "year" | "years"
|
||||
| "quarter" | "quarters"
|
||||
| "month" | "months"
|
||||
| "week" | "weeks"
|
||||
| "day" | "days"
|
||||
| "hour" | "hours"
|
||||
| "minute" | "minutes"
|
||||
| "second" | "seconds"
|
||||
;
|
||||
|
||||
/**
|
||||
* The locale matching algorithm to use.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation).
|
||||
*
|
||||
* [Specification](https://tc39.es/ecma402/#sec-InitializeRelativeTimeFormat).
|
||||
*/
|
||||
type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit";
|
||||
|
||||
/**
|
||||
* The format of output message.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters).
|
||||
*
|
||||
* [Specification](https://tc39.es/ecma402/#sec-InitializeRelativeTimeFormat).
|
||||
*/
|
||||
type RelativeTimeFormatNumeric = "always" | "auto";
|
||||
|
||||
/**
|
||||
* The length of the internationalized message.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters).
|
||||
*
|
||||
* [Specification](https://tc39.es/ecma402/#sec-InitializeRelativeTimeFormat).
|
||||
*/
|
||||
type RelativeTimeFormatStyle = "long" | "short" | "narrow";
|
||||
|
||||
/**
|
||||
* An object with some or all of properties of `options` parameter
|
||||
* of `Intl.RelativeTimeFormat` constructor.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters).
|
||||
*
|
||||
* [Specification](https://tc39.es/ecma402/#sec-InitializeRelativeTimeFormat).
|
||||
*/
|
||||
interface RelativeTimeFormatOptions {
|
||||
localeMatcher?: RelativeTimeFormatLocaleMatcher;
|
||||
numeric?: RelativeTimeFormatNumeric;
|
||||
style?: RelativeTimeFormatStyle;
|
||||
}
|
||||
|
||||
/**
|
||||
* An object with properties reflecting the locale
|
||||
* and formatting options computed during initialization
|
||||
* of the `Intel.RelativeTimeFormat` object
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description).
|
||||
*
|
||||
* [Specification](https://tc39.es/ecma402/#table-relativetimeformat-resolvedoptions-properties)
|
||||
*/
|
||||
interface ResolvedRelativeTimeFormatOptions {
|
||||
locale: BCP47LanguageTag;
|
||||
style: RelativeTimeFormatStyle;
|
||||
numeric: RelativeTimeFormatNumeric;
|
||||
numberingSystem: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* An object representing the relative time format in parts
|
||||
* that can be used for custom locale-aware formatting.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts).
|
||||
*
|
||||
* [Specification](https://tc39.es/ecma402/#sec-FormatRelativeTimeToParts).
|
||||
*/
|
||||
interface RelativeTimeFormatPart {
|
||||
type: string;
|
||||
value: string;
|
||||
unit?: RelativeTimeFormatUnit;
|
||||
}
|
||||
|
||||
interface RelativeTimeFormat {
|
||||
/**
|
||||
* Formats a value and a unit according to the locale
|
||||
* and formatting options of the given
|
||||
* [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat)
|
||||
* object.
|
||||
*
|
||||
* While this method automatically provides the correct plural forms,
|
||||
* the grammatical form is otherwise as neutral as possible.
|
||||
* It is the caller's responsibility to handle cut-off logic
|
||||
* such as deciding between displaying "in 7 days" or "in 1 week".
|
||||
* This API does not support relative dates involving compound units.
|
||||
* e.g "in 5 days and 4 hours".
|
||||
*
|
||||
* @param value - Numeric value to use in the internationalized relative time message
|
||||
*
|
||||
* @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit)
|
||||
* to use in the relative time internationalized message.
|
||||
* Possible values are: `"year"`, `"quarter"`, `"month"`, `"week"`,
|
||||
* `"day"`, `"hour"`, `"minute"`, `"second"`.
|
||||
* Plural forms are also permitted.
|
||||
*
|
||||
* @throws `RangeError` if `unit` was given something other than `unit` possible values
|
||||
*
|
||||
* @returns Internationalized relative time message as string
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format).
|
||||
*
|
||||
* [Specification](https://tc39.es/ecma402/#sec-Intl.RelativeTimeFormat.prototype.format).
|
||||
*/
|
||||
format(
|
||||
value: number,
|
||||
unit: RelativeTimeFormatUnit,
|
||||
): string;
|
||||
|
||||
/**
|
||||
* A version of the format method which it returns an array of objects
|
||||
* which represent "parts" of the object,
|
||||
* separating the formatted number into its constituent parts
|
||||
* and separating it from other surrounding text.
|
||||
* These objects have two properties:
|
||||
* `type` a NumberFormat formatToParts type, and `value`,
|
||||
* which is the String which is the component of the output.
|
||||
* If a "part" came from NumberFormat,
|
||||
* it will have a unit property which indicates the `unit` being formatted;
|
||||
* literals which are part of the larger frame will not have this property.
|
||||
*
|
||||
* @param value - Numeric value to use in the internationalized relative time message
|
||||
*
|
||||
* @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit)
|
||||
* to use in the relative time internationalized message.
|
||||
* Possible values are: `"year"`, `"quarter"`, `"month"`, `"week"`,
|
||||
* `"day"`, `"hour"`, `"minute"`, `"second"`.
|
||||
* Plural forms are also permitted.
|
||||
*
|
||||
* @throws `RangeError` if `unit` was given something other than `unit` possible values
|
||||
*
|
||||
* @returns Array of [FormatRelativeTimeToParts](https://tc39.es/ecma402/#sec-FormatRelativeTimeToParts)
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts).
|
||||
*
|
||||
* [Specification](https://tc39.es/ecma402/#sec-Intl.RelativeTimeFormat.prototype.formatToParts).
|
||||
*/
|
||||
formatToParts(
|
||||
value: number,
|
||||
unit: RelativeTimeFormatUnit,
|
||||
): RelativeTimeFormatPart[];
|
||||
|
||||
/**
|
||||
* Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object.
|
||||
*
|
||||
* @returns A new object with properties reflecting the locale
|
||||
* and formatting options computed during initialization
|
||||
* of the `Intel.RelativeTimeFormat` object.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions).
|
||||
*
|
||||
* [Specification](https://tc39.es/ecma402/#sec-intl.relativetimeformat.prototype.resolvedoptions)
|
||||
*/
|
||||
resolvedOptions(): ResolvedRelativeTimeFormatOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat)
|
||||
* object is a constructor for objects that enable language-sensitive relative time formatting.
|
||||
*
|
||||
* Part of [Intl object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl)
|
||||
* namespace and the [ECMAScript Internationalization API](https://www.ecma-international.org/publications/standards/Ecma-402.htm).
|
||||
*
|
||||
* [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility).
|
||||
*
|
||||
* [Polyfills](https://github.com/tc39/proposal-intl-relative-time#polyfills).
|
||||
*/
|
||||
const RelativeTimeFormat: {
|
||||
/**
|
||||
* Constructor creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat)
|
||||
* objects
|
||||
*
|
||||
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
||||
* For the general form and interpretation of the locales argument,
|
||||
* see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
||||
*
|
||||
* @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters)
|
||||
* with some or all of options of the formatting.
|
||||
* An object with some or all of the following properties:
|
||||
* - `localeMatcher` - The locale matching algorithm to use.
|
||||
* Possible values are `"lookup"` and `"best fit"`; the default is `"best fit"`.
|
||||
* For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation).
|
||||
* - `numeric` - The format of output message.
|
||||
* Possible values are: `"always"` (default, e.g., `1 day ago`) or `"auto"` (e.g., `yesterday`).
|
||||
* The `"auto"` value allows to not always have to use numeric values in the output.
|
||||
* - `style` - The length of the internationalized message. Possible values are:
|
||||
* `"long"` (default, e.g., in 1 month),
|
||||
* `"short"` (e.g., in 1 mo.)
|
||||
* or `"narrow"` (e.g., in 1 mo.). The narrow style could be similar to the short style for some locales.
|
||||
*
|
||||
* @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat).
|
||||
*
|
||||
* [Specification](https://tc39.es/ecma402/#sec-intl-relativetimeformat-constructor).
|
||||
*/
|
||||
new(
|
||||
locales?: BCP47LanguageTag | BCP47LanguageTag[],
|
||||
options?: RelativeTimeFormatOptions,
|
||||
): RelativeTimeFormat;
|
||||
|
||||
/**
|
||||
* Returns an array containing those of the provided locales
|
||||
* that are supported in date and time formatting
|
||||
* without having to fall back to the runtime's default locale.
|
||||
*
|
||||
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
||||
* For the general form and interpretation of the locales argument,
|
||||
* see the [`Intl` page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
||||
*
|
||||
* @param options - An [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters)
|
||||
* with some or all of options of the formatting.
|
||||
* An object with some or all of the following properties:
|
||||
* - `localeMatcher` - The locale matching algorithm to use.
|
||||
* Possible values are `"lookup"` and `"best fit"`; the default is `"best fit"`.
|
||||
* For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation).
|
||||
* - `numeric` - The format of output message.
|
||||
* Possible values are: `"always"` (default, e.g., `1 day ago`) or `"auto"` (e.g., `yesterday`).
|
||||
* The `"auto"` value allows to not always have to use numeric values in the output.
|
||||
* - `style` - The length of the internationalized message. Possible values are:
|
||||
* `"long"` (default, e.g., in 1 month),
|
||||
* `"short"` (e.g., in 1 mo.)
|
||||
* or `"narrow"` (e.g., in 1 mo.). The narrow style could be similar to the short style for some locales.
|
||||
*
|
||||
* @returns An array containing those of the provided locales
|
||||
* that are supported in date and time formatting
|
||||
* without having to fall back to the runtime's default locale.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf).
|
||||
*
|
||||
* [Specification](https://tc39.es/ecma402/#sec-Intl.RelativeTimeFormat.supportedLocalesOf).
|
||||
*/
|
||||
supportedLocalesOf(
|
||||
locales: BCP47LanguageTag | BCP47LanguageTag[],
|
||||
options?: RelativeTimeFormatOptions,
|
||||
): BCP47LanguageTag[];
|
||||
};
|
||||
}
|
||||
Vendored
+1
-1
@@ -1254,7 +1254,7 @@ interface Array<T> {
|
||||
* @param start The zero-based location in the array from which to start removing elements.
|
||||
* @param deleteCount The number of elements to remove.
|
||||
*/
|
||||
splice(start: number, deleteCount: number): T[];
|
||||
splice(start: number, deleteCount?: number): T[];
|
||||
/**
|
||||
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
|
||||
* @param start The zero-based location in the array from which to start removing elements.
|
||||
|
||||
Vendored
+7
@@ -5,4 +5,11 @@ interface String {
|
||||
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
|
||||
*/
|
||||
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
|
||||
|
||||
/**
|
||||
* Replace all instances of a substring in a string, using a regular expression or search string.
|
||||
* @param searchValue A string to search for.
|
||||
* @param replacer A function that returns the replacement text.
|
||||
*/
|
||||
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
"es2020.promise",
|
||||
"es2020.string",
|
||||
"es2020.symbol.wellknown",
|
||||
"es2020.intl",
|
||||
"esnext.intl",
|
||||
"esnext.string",
|
||||
"esnext.promise",
|
||||
|
||||
Vendored
+24
-24
@@ -262,8 +262,8 @@ interface KeyAlgorithm {
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface MessageEventInit extends EventInit {
|
||||
data?: any;
|
||||
interface MessageEventInit<T = any> extends EventInit {
|
||||
data?: T;
|
||||
lastEventId?: string;
|
||||
origin?: string;
|
||||
ports?: MessagePort[];
|
||||
@@ -893,7 +893,7 @@ declare var Client: {
|
||||
/** Provides access to Client objects. Access it via self.clients within a service worker. */
|
||||
interface Clients {
|
||||
claim(): Promise<void>;
|
||||
get(id: string): Promise<any>;
|
||||
get(id: string): Promise<Client | undefined>;
|
||||
matchAll(options?: ClientQueryOptions): Promise<ReadonlyArray<Client>>;
|
||||
openWindow(url: string): Promise<WindowClient | null>;
|
||||
}
|
||||
@@ -2221,11 +2221,11 @@ declare var MessageChannel: {
|
||||
};
|
||||
|
||||
/** A message received by a target object. */
|
||||
interface MessageEvent extends Event {
|
||||
interface MessageEvent<T = any> extends Event {
|
||||
/**
|
||||
* Returns the data of the message.
|
||||
*/
|
||||
readonly data: any;
|
||||
readonly data: T;
|
||||
/**
|
||||
* Returns the last event ID string, for server-sent events.
|
||||
*/
|
||||
@@ -2246,7 +2246,7 @@ interface MessageEvent extends Event {
|
||||
|
||||
declare var MessageEvent: {
|
||||
prototype: MessageEvent;
|
||||
new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
|
||||
new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>;
|
||||
};
|
||||
|
||||
interface MessagePortEventMap {
|
||||
@@ -3033,24 +3033,24 @@ declare var StorageManager: {
|
||||
|
||||
/** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */
|
||||
interface SubtleCrypto {
|
||||
decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
|
||||
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike<ArrayBuffer>;
|
||||
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
|
||||
digest(algorithm: AlgorithmIdentifier, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
|
||||
encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
|
||||
exportKey(format: "jwk", key: CryptoKey): PromiseLike<JsonWebKey>;
|
||||
exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): PromiseLike<ArrayBuffer>;
|
||||
exportKey(format: string, key: CryptoKey): PromiseLike<JsonWebKey | ArrayBuffer>;
|
||||
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKeyPair | CryptoKey>;
|
||||
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKeyPair>;
|
||||
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
|
||||
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
|
||||
importKey(format: "raw" | "pkcs8" | "spki", keyData: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
|
||||
importKey(format: string, keyData: JsonWebKey | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
|
||||
sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
|
||||
unwrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, wrappedKey: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
|
||||
verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<boolean>;
|
||||
wrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams): PromiseLike<ArrayBuffer>;
|
||||
decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>;
|
||||
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
|
||||
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
||||
digest(algorithm: AlgorithmIdentifier, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>;
|
||||
encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>;
|
||||
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
|
||||
exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): Promise<ArrayBuffer>;
|
||||
exportKey(format: string, key: CryptoKey): Promise<JsonWebKey | ArrayBuffer>;
|
||||
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
|
||||
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
|
||||
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
||||
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
||||
importKey(format: "raw" | "pkcs8" | "spki", keyData: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
||||
importKey(format: string, keyData: JsonWebKey | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
||||
sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>;
|
||||
unwrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, wrappedKey: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
||||
verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<boolean>;
|
||||
wrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams): Promise<ArrayBuffer>;
|
||||
}
|
||||
|
||||
declare var SubtleCrypto: {
|
||||
|
||||
Reference in New Issue
Block a user