From 94470bc9b3f01f4c8fc22e8d7fff86a00d8da29f Mon Sep 17 00:00:00 2001 From: Freddie Wang Date: Sun, 21 Mar 2021 14:43:15 +0800 Subject: [PATCH] upgrade --- build-env/assets/changelog.md | 8 + build-env/typescript/LICENSE.txt | 55 + build-env/typescript/lib/README.md | 5 + build-env/typescript/lib/lib.dom.d.ts | 710 +- .../typescript/lib/lib.dom.iterable.d.ts | 7 + build-env/typescript/lib/lib.es2015.core.d.ts | 28 +- .../typescript/lib/lib.es2015.iterable.d.ts | 8 +- .../typescript/lib/lib.es2015.promise.d.ts | 14 +- .../typescript/lib/lib.es2015.proxy.d.ts | 27 +- .../typescript/lib/lib.es2015.reflect.d.ts | 96 +- .../lib/lib.es2015.symbol.wellknown.d.ts | 5 + .../lib/lib.es2017.sharedmemory.d.ts | 9 +- .../typescript/lib/lib.es2020.bigint.d.ts | 143 +- build-env/typescript/lib/lib.es2020.d.ts | 2 + build-env/typescript/lib/lib.es2020.intl.d.ts | 310 + .../lib/lib.es2020.sharedmemory.d.ts | 99 + build-env/typescript/lib/lib.es5.d.ts | 420 +- .../typescript/lib/lib.esnext.array.d.ts | 223 - .../lib/lib.esnext.asynciterable.d.ts | 44 - .../typescript/lib/lib.esnext.bigint.d.ts | 629 -- build-env/typescript/lib/lib.esnext.d.ts | 1 + build-env/typescript/lib/lib.esnext.intl.d.ts | 2 +- .../typescript/lib/lib.esnext.symbol.d.ts | 26 - .../typescript/lib/lib.esnext.weakref.d.ts | 75 + build-env/typescript/lib/lib.webworker.d.ts | 355 +- .../lib/lib.webworker.iterable.d.ts | 166 + build-env/typescript/lib/protocol.d.ts | 155 +- build-env/typescript/lib/typescript.d.ts | 7222 +++++++++++++++++ build-env/typescript/lib/typescript.js | 2 +- build-env/typescript/package-lock.json | 61 - build-env/typescript/package.json | 44 +- package-lock.json | 487 +- package.json | 4 +- plugins/tsconfig.json | 2 +- src/AsphyxiaCore.ts | 4 +- src/eamuse/Core/CardManager.ts | 3 + src/eamuse/EamusePlugin.ts | 21 +- src/utils/ArgConfig.ts | 2 +- src/utils/AutoBuffer.ts | 3 +- tsconfig.json | 3 +- 40 files changed, 9442 insertions(+), 2038 deletions(-) create mode 100644 build-env/typescript/LICENSE.txt create mode 100644 build-env/typescript/lib/README.md create mode 100644 build-env/typescript/lib/lib.es2020.intl.d.ts create mode 100644 build-env/typescript/lib/lib.es2020.sharedmemory.d.ts delete mode 100644 build-env/typescript/lib/lib.esnext.array.d.ts delete mode 100644 build-env/typescript/lib/lib.esnext.asynciterable.d.ts delete mode 100644 build-env/typescript/lib/lib.esnext.bigint.d.ts delete mode 100644 build-env/typescript/lib/lib.esnext.symbol.d.ts create mode 100644 build-env/typescript/lib/lib.esnext.weakref.d.ts create mode 100644 build-env/typescript/lib/lib.webworker.iterable.d.ts create mode 100644 build-env/typescript/lib/typescript.d.ts delete mode 100644 build-env/typescript/package-lock.json diff --git a/build-env/assets/changelog.md b/build-env/assets/changelog.md index 4157426..409b032 100644 --- a/build-env/assets/changelog.md +++ b/build-env/assets/changelog.md @@ -1,3 +1,11 @@ +## v1.30a + +- **CORE**: Fixed an issue where the command line options are ignored +- **PluginLoader**: Fixed an error during card-in if the current gamecode is not registered by any plugins +- **Misc**: Upgrade TypeScript to 4.2.3 +- **Misc**: Plugins are now targeting es5 to make sure TypeScript correctly transpile newer ES features for NodeJS 10 and 12 + + ## v1.20f - **Misc**: Auto startup now respects bind address and supports IPv6 better diff --git a/build-env/typescript/LICENSE.txt b/build-env/typescript/LICENSE.txt new file mode 100644 index 0000000..edc24fd --- /dev/null +++ b/build-env/typescript/LICENSE.txt @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/build-env/typescript/lib/README.md b/build-env/typescript/lib/README.md new file mode 100644 index 0000000..ce0455f --- /dev/null +++ b/build-env/typescript/lib/README.md @@ -0,0 +1,5 @@ +# Read This! + +**These files are not meant to be edited by hand.** +If you need to make modifications, the respective files should be changed within the repository's top-level `src` directory. +Running `gulp LKG` will then appropriately update the files in this directory. diff --git a/build-env/typescript/lib/lib.dom.d.ts b/build-env/typescript/lib/lib.dom.d.ts index 86c4043..960a680 100644 --- a/build-env/typescript/lib/lib.dom.d.ts +++ b/build-env/typescript/lib/lib.dom.d.ts @@ -155,29 +155,21 @@ interface AudioWorkletNodeOptions extends AudioNodeOptions { interface AuthenticationExtensionsClientInputs { appid?: string; - authnSel?: AuthenticatorSelectionList; - exts?: boolean; - loc?: boolean; - txAuthGeneric?: txAuthGenericArg; - txAuthSimple?: string; - uvi?: boolean; + appidExclude?: string; + credProps?: boolean; uvm?: boolean; } interface AuthenticationExtensionsClientOutputs { appid?: boolean; - authnSel?: boolean; - exts?: AuthenticationExtensionsSupported; - loc?: Coordinates; - txAuthGeneric?: ArrayBuffer; - txAuthSimple?: string; - uvi?: ArrayBuffer; + credProps?: CredentialPropertiesOutput; uvm?: UvmEntries; } interface AuthenticatorSelectionCriteria { authenticatorAttachment?: AuthenticatorAttachment; requireResidentKey?: boolean; + residentKey?: ResidentKeyRequirement; userVerification?: UserVerificationRequirement; } @@ -304,6 +296,10 @@ interface CredentialCreationOptions { signal?: AbortSignal; } +interface CredentialPropertiesOutput { + rk?: boolean; +} + interface CredentialRequestOptions { mediation?: CredentialMediationRequirement; publicKey?: PublicKeyCredentialRequestOptions; @@ -618,6 +614,10 @@ interface ImageEncodeOptions { type?: string; } +interface ImportMeta { + url: string; +} + interface InputEventInit extends UIEventInit { data?: string | null; inputType?: string; @@ -635,7 +635,7 @@ interface IntersectionObserverEntryInit { } interface IntersectionObserverInit { - root?: Element | null; + root?: Element | Document | null; rootMargin?: string; threshold?: number | number[]; } @@ -666,9 +666,13 @@ interface KeyAlgorithm { } interface KeyboardEventInit extends EventModifierInit { + /** @deprecated */ + charCode?: number; code?: string; isComposing?: boolean; key?: string; + /** @deprecated */ + keyCode?: number; location?: number; repeat?: boolean; } @@ -825,8 +829,8 @@ interface MediaTrackSupportedConstraints { width?: boolean; } -interface MessageEventInit extends EventInit { - data?: any; +interface MessageEventInit extends EventInit { + data?: T; lastEventId?: string; origin?: string; ports?: MessagePort[]; @@ -1045,18 +1049,13 @@ interface PermissionDescriptor { name: PermissionName; } -interface PipeOptions { - preventAbort?: boolean; - preventCancel?: boolean; - preventClose?: boolean; - signal?: AbortSignal; -} - interface PointerEventInit extends MouseEventInit { + coalescedEvents?: PointerEvent[]; height?: number; isPrimary?: boolean; pointerId?: number; pointerType?: string; + predictedEvents?: PointerEvent[]; pressure?: number; tangentialPressure?: number; tiltX?: number; @@ -1116,7 +1115,6 @@ interface PublicKeyCredentialDescriptor { } interface PublicKeyCredentialEntity { - icon?: string; name: string; } @@ -1161,7 +1159,16 @@ interface PushSubscriptionOptionsInit { interface QueuingStrategy { highWaterMark?: number; - size?: QueuingStrategySizeCallback; + size?: QueuingStrategySize; +} + +interface QueuingStrategyInit { + /** + * Creates a new ByteLengthQueuingStrategy with the provided high water mark. + * + * Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw. + */ + highWaterMark: number; } interface RTCAnswerOptions extends RTCOfferAnswerOptions { @@ -1262,17 +1269,36 @@ interface RTCIceCandidatePair { interface RTCIceCandidatePairStats extends RTCStats { availableIncomingBitrate?: number; availableOutgoingBitrate?: number; + bytesDiscardedOnSend?: number; bytesReceived?: number; bytesSent?: number; + circuitBreakerTriggerCount?: number; + consentExpiredTimestamp?: number; + consentRequestsSent?: number; + currentRoundTripTime?: number; + currentRtt?: number; + firstRequestTimestamp?: number; + lastPacketReceivedTimestamp?: number; + lastPacketSentTimestamp?: number; + lastRequestTimestamp?: number; + lastResponseTimestamp?: number; localCandidateId?: string; nominated?: boolean; + packetsDiscardedOnSend?: number; + packetsReceived?: number; + packetsSent?: number; priority?: number; - readable?: boolean; remoteCandidateId?: string; - roundTripTime?: number; + requestsReceived?: number; + requestsSent?: number; + responsesReceived?: number; + responsesSent?: number; + retransmissionsReceived?: number; + retransmissionsSent?: number; state?: RTCStatsIceCandidatePairState; + totalRoundTripTime?: number; + totalRtt?: number; transportId?: string; - writable?: boolean; } interface RTCIceGatherOptions { @@ -1510,9 +1536,9 @@ interface RTCSsrcRange { } interface RTCStats { - id: string; - timestamp: number; - type: RTCStatsType; + id?: string; + timestamp?: number; + type?: RTCStatsType; } interface RTCStatsEventInit extends EventInit { @@ -1530,25 +1556,43 @@ interface RTCTrackEventInit extends EventInit { } interface RTCTransportStats extends RTCStats { - activeConnection?: boolean; bytesReceived?: number; bytesSent?: number; + dtlsCipher?: string; + dtlsState?: RTCDtlsTransportState; + iceRole?: RTCIceRole; localCertificateId?: string; + packetsReceived?: number; + packetsSent?: number; remoteCertificateId?: string; rtcpTransportStatsId?: string; + selectedCandidatePairChanges?: number; selectedCandidatePairId?: string; + srtpCipher?: string; + tlsGroup?: string; + tlsVersion?: string; } -interface ReadableStreamReadDoneResult { +interface ReadableStreamDefaultReadDoneResult { done: true; - value?: T; + value?: undefined; } -interface ReadableStreamReadValueResult { +interface ReadableStreamDefaultReadValueResult { done: false; value: T; } +interface ReadableWritablePair { + readable: ReadableStream; + /** + * Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use. + * + * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader. + */ + writable: WritableStream; +} + interface RegistrationOptions { scope?: string; type?: WorkerType; @@ -1610,6 +1654,10 @@ interface RequestInit { window?: any; } +interface ResizeObserverOptions { + box?: ResizeObserverBoxOptions; +} + interface ResponseInit { headers?: HeadersInit; status?: number; @@ -1723,6 +1771,16 @@ interface ShareData { url?: string; } +interface SpeechRecognitionErrorEventInit extends EventInit { + error: SpeechRecognitionErrorCode; + message?: string; +} + +interface SpeechRecognitionEventInit extends EventInit { + resultIndex?: number; + results: SpeechRecognitionResultList; +} + interface SpeechSynthesisErrorEventInit extends SpeechSynthesisEventInit { error: SpeechSynthesisErrorCode; } @@ -1769,6 +1827,30 @@ interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformat arrayOfDomainStrings?: string[]; } +interface StreamPipeOptions { + preventAbort?: boolean; + preventCancel?: boolean; + /** + * Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered. + * + * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader. + * + * Errors and closures of the source and destination streams propagate as follows: + * + * An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination. + * + * An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source. + * + * When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error. + * + * If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source. + * + * The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set. + */ + preventClose?: boolean; + signal?: AbortSignal; +} + interface TextDecodeOptions { stream?: boolean; } @@ -1812,10 +1894,10 @@ interface TrackEventInit extends EventInit { } interface Transformer { - flush?: TransformStreamDefaultControllerCallback; + flush?: TransformerFlushCallback; readableType?: undefined; - start?: TransformStreamDefaultControllerCallback; - transform?: TransformStreamDefaultControllerTransformCallback; + start?: TransformerStartCallback; + transform?: TransformerTransformCallback; writableType?: undefined; } @@ -1835,26 +1917,18 @@ interface ULongRange { min?: number; } -interface UnderlyingByteSource { - autoAllocateChunkSize?: number; - cancel?: ReadableStreamErrorCallback; - pull?: ReadableByteStreamControllerCallback; - start?: ReadableByteStreamControllerCallback; - type: "bytes"; -} - interface UnderlyingSink { - abort?: WritableStreamErrorCallback; - close?: WritableStreamDefaultControllerCloseCallback; - start?: WritableStreamDefaultControllerStartCallback; + abort?: UnderlyingSinkAbortCallback; + close?: UnderlyingSinkCloseCallback; + start?: UnderlyingSinkStartCallback; type?: undefined; - write?: WritableStreamDefaultControllerWriteCallback; + write?: UnderlyingSinkWriteCallback; } interface UnderlyingSource { - cancel?: ReadableStreamErrorCallback; - pull?: ReadableStreamDefaultControllerCallback; - start?: ReadableStreamDefaultControllerCallback; + cancel?: UnderlyingSourceCancelCallback; + pull?: UnderlyingSourcePullCallback; + start?: UnderlyingSourceStartCallback; type?: undefined; } @@ -1916,11 +1990,6 @@ interface WorkletOptions { credentials?: RequestCredentials; } -interface txAuthGenericArg { - content: ArrayBuffer; - contentType: string; -} - interface EventListener { (evt: Event): void; } @@ -2348,7 +2417,9 @@ declare var AudioParamMap: { new(): AudioParamMap; }; -/** The Web Audio API events that occur when a ScriptProcessorNode input buffer is ready to be processed. */ +/** The Web Audio API events that occur when a ScriptProcessorNode input buffer is ready to be processed. + * @deprecated As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and is soon to be replaced by AudioWorklet. + */ interface AudioProcessingEvent extends Event { readonly inputBuffer: AudioBuffer; readonly outputBuffer: AudioBuffer; @@ -2591,13 +2662,13 @@ declare var BroadcastChannel: { /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */ interface ByteLengthQueuingStrategy extends QueuingStrategy { - highWaterMark: number; - size(chunk: ArrayBufferView): number; + readonly highWaterMark: number; + readonly size: QueuingStrategySize; } declare var ByteLengthQueuingStrategy: { prototype: ByteLengthQueuingStrategy; - new(options: { highWaterMark: number }): ByteLengthQueuingStrategy; + new(init: QueuingStrategyInit): ByteLengthQueuingStrategy; }; /** A CDATA section that can be used within XML to include extended portions of unescaped text. The symbols < and & don’t need escaping as they normally do when inside a CDATA section. */ @@ -2978,6 +3049,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; @@ -3635,26 +3711,15 @@ declare var ConvolverNode: { new(context: BaseAudioContext, options?: ConvolverOptions): ConvolverNode; }; -/** The position and altitude of the device on Earth, as well as the accuracy with which these properties are calculated. */ -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; -} - /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */ interface CountQueuingStrategy extends QueuingStrategy { - highWaterMark: number; - size(chunk: any): 1; + readonly highWaterMark: number; + readonly size: QueuingStrategySize; } declare var CountQueuingStrategy: { prototype: CountQueuingStrategy; - new(options: { highWaterMark: number }): CountQueuingStrategy; + new(init: QueuingStrategyInit): CountQueuingStrategy; }; interface Credential { @@ -3814,7 +3879,7 @@ declare var DOMException: { /** An object providing methods which are not dependent on any particular document. Such an object is returned by the Document.implementation property. */ interface DOMImplementation { - createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType | null): Document; + createDocument(namespace: string | null, qualifiedName: string | null, doctype?: DocumentType | null): XMLDocument; createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType; createHTMLDocument(title?: string): Document; /** @deprecated */ @@ -3938,7 +4003,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: { @@ -4173,7 +4247,7 @@ interface DataTransfer { * * The possible values are "none", "copy", "link", and "move". */ - dropEffect: string; + dropEffect: "none" | "copy" | "link" | "move"; /** * Returns the kinds of operations that are to be allowed. * @@ -4181,7 +4255,7 @@ interface DataTransfer { * * The possible values are "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all", and "uninitialized", */ - effectAllowed: string; + effectAllowed: "none" | "copy" | "copyLink" | "copyMove" | "link" | "linkMove" | "move" | "all" | "uninitialized"; /** * Returns a FileList of the files being dragged, if any. */ @@ -4549,10 +4623,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. @@ -4709,6 +4779,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent; + createEvent(eventInterface: "SpeechRecognitionErrorEvent"): SpeechRecognitionErrorEvent; createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; @@ -4776,8 +4847,8 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad exitPointerLock(): void; getAnimations(): Animation[]; /** - * Returns a reference to the first object with the specified value of the ID or NAME attribute. - * @param elementId String that specifies the ID value. Case-insensitive. + * Returns a reference to the first object with the specified value of the ID attribute. + * @param elementId String that specifies the ID value. */ getElementById(elementId: string): HTMLElement | null; /** @@ -4958,6 +5029,7 @@ interface DocumentEvent { createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent; + createEvent(eventInterface: "SpeechRecognitionErrorEvent"): SpeechRecognitionErrorEvent; createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; @@ -5085,8 +5157,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 { - readonly assignedSlot: HTMLSlotElement | null; +interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slottable { readonly attributes: NamedNodeMap; /** * Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. @@ -5158,8 +5229,8 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp * Returns the qualified names of all element's attributes. Can contain duplicates. */ getAttributeNames(): string[]; - getAttributeNode(name: string): Attr | null; - getAttributeNodeNS(namespaceURI: string, localName: string): Attr | null; + getAttributeNode(qualifiedName: string): Attr | null; + getAttributeNodeNS(namespace: string | null, localName: string): Attr | null; getBoundingClientRect(): DOMRect; getClientRects(): DOMRectList; /** @@ -5252,6 +5323,7 @@ interface ElementCSSInlineStyle { interface ElementContentEditable { contentEditable: string; + enterKeyHint: string; inputMode: string; readonly isContentEditable: boolean; } @@ -5640,24 +5712,7 @@ declare var GamepadPose: { }; interface GenericTransformStream { - /** - * Returns a readable stream whose chunks are strings resulting from running encoding's decoder on the chunks written to writable. - */ readonly readable: ReadableStream; - /** - * Returns a writable stream which accepts [AllowShared] BufferSource chunks and runs them through encoding's decoder before making them available to readable. - * - * Typically this will be used via the pipeThrough() method on a ReadableStream source. - * - * ``` - * var decoder = new TextDecoderStream(encoding); - * byteReadable - * .pipeThrough(decoder) - * .pipeTo(textWritable); - * ``` - * - * If the error mode is "fatal" and encoding's decoder returns error, both readable and writable will be errored with a TypeError. - */ readonly writable: WritableStream; } @@ -5668,6 +5723,52 @@ interface Geolocation { watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number; } +declare var Geolocation: { + prototype: Geolocation; + new(): Geolocation; +}; + +interface GeolocationCoordinates { + 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 GeolocationCoordinates: { + prototype: GeolocationCoordinates; + new(): GeolocationCoordinates; +}; + +interface GeolocationPosition { + readonly coords: GeolocationCoordinates; + readonly timestamp: number; +} + +declare var GeolocationPosition: { + prototype: GeolocationPosition; + new(): GeolocationPosition; +}; + +interface GeolocationPositionError { + readonly code: number; + readonly message: string; + readonly PERMISSION_DENIED: number; + readonly POSITION_UNAVAILABLE: number; + readonly TIMEOUT: number; +} + +declare var GeolocationPositionError: { + prototype: GeolocationPositionError; + new(): GeolocationPositionError; + readonly PERMISSION_DENIED: number; + readonly POSITION_UNAVAILABLE: number; + readonly TIMEOUT: number; +}; + interface GlobalEventHandlersEventMap { "abort": UIEvent; "animationcancel": AnimationEvent; @@ -5675,6 +5776,7 @@ interface GlobalEventHandlersEventMap { "animationiteration": AnimationEvent; "animationstart": AnimationEvent; "auxclick": MouseEvent; + "beforeinput": InputEvent; "blur": FocusEvent; "cancel": Event; "canplay": Event; @@ -5682,6 +5784,9 @@ interface GlobalEventHandlersEventMap { "change": Event; "click": MouseEvent; "close": Event; + "compositionend": CompositionEvent; + "compositionstart": CompositionEvent; + "compositionupdate": CompositionEvent; "contextmenu": MouseEvent; "cuechange": Event; "dblclick": MouseEvent; @@ -7084,6 +7189,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. */ @@ -7320,7 +7426,7 @@ interface HTMLInputElement extends HTMLElement { * @param end The offset into the text field for the end of the selection. * @param direction The direction in which the selection is performed. */ - setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void; + setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void; /** * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value. * @param n Value to decrement the value by. @@ -8616,7 +8722,6 @@ declare var HTMLTableElement: { }; interface HTMLTableHeaderCellElement extends HTMLTableCellElement { - scope: string; addEventListener(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -8827,7 +8932,7 @@ interface HTMLTextAreaElement extends HTMLElement { * @param end The offset into the text field for the end of the selection. * @param direction The direction in which the selection is performed. */ - setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void; + setSelectionRange(start: number | null, end: number | null, direction?: "forward" | "backward" | "none"): void; addEventListener(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -8934,6 +9039,10 @@ interface HTMLVideoElement extends HTMLMediaElement { * Gets or sets the height of the video element. */ height: number; + /** + * Gets or sets the playsinline of the video element. for example, On iPhone, video elements will now be allowed to play inline, and will not automatically enter fullscreen mode when playback begins. + */ + playsInline: boolean; /** * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available. */ @@ -9011,12 +9120,6 @@ declare var History: { new(): History; }; -interface HkdfCtrParams extends Algorithm { - context: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; - hash: string | Algorithm; - label: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; -} - interface IDBArrayKey extends Array { } @@ -9118,7 +9221,7 @@ interface IDBDatabase extends EventTarget { * * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction. */ - createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; + createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore; /** * Deletes the object store with the given name. * @@ -9566,8 +9669,8 @@ interface ImageData { declare var ImageData: { prototype: ImageData; - new(width: number, height: number): ImageData; - new(array: Uint8ClampedArray, width: number, height?: number): ImageData; + new(sw: number, sh: number): ImageData; + new(data: Uint8ClampedArray, sw: number, sh?: number): ImageData; }; interface InnerHTML { @@ -9596,7 +9699,7 @@ declare var InputEvent: { /** provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport. */ interface IntersectionObserver { - readonly root: Element | null; + readonly root: Element | Document | null; readonly rootMargin: string; readonly thresholds: ReadonlyArray; disconnect(): void; @@ -10404,11 +10507,11 @@ declare var MessageChannel: { }; /** A message received by a target object. */ -interface MessageEvent extends Event { +interface MessageEvent extends Event { /** * Returns the data of the message. */ - readonly data: any; + readonly data: T; /** * Returns the last event ID string, for server-sent events. */ @@ -10429,7 +10532,7 @@ interface MessageEvent extends Event { declare var MessageEvent: { prototype: MessageEvent; - new(type: string, eventInitDict?: MessageEventInit): MessageEvent; + new(type: string, eventInitDict?: MessageEventInit): MessageEvent; }; interface MessagePortEventMap { @@ -10535,7 +10638,8 @@ declare var MouseEvent: { new(type: string, eventInitDict?: MouseEventInit): MouseEvent; }; -/** Provides event properties that are specific to modifications to the Document Object Model (DOM) hierarchy and nodes. */ +/** Provides event properties that are specific to modifications to the Document Object Model (DOM) hierarchy and nodes. + * @deprecated DOM4 [DOM] provides a new mechanism using a MutationObserver interface which addresses the use cases that mutation events solve, but in a more performant manner. Thus, this specification describes mutation events for reference and completeness of legacy behavior, but deprecates the use of the MutationEvent interface. */ interface MutationEvent extends Event { readonly attrChange: number; readonly attrName: string; @@ -11013,7 +11117,6 @@ declare var NodeList: { }; interface NodeListOf extends NodeList { - length: number; item(index: number): TNode; /** * Performs the specified action for each node in an list. @@ -11522,7 +11625,9 @@ declare var PerformanceMeasure: { new(): PerformanceMeasure; }; -/** The legacy PerformanceNavigation interface represents information about how the navigation to the current document was done. */ +/** The legacy PerformanceNavigation interface represents information about how the navigation to the current document was done. + * @deprecated This interface is deprecated in the Navigation Timing Level 2 specification. Please use the PerformanceNavigationTiming interface instead. + */ interface PerformanceNavigation { readonly redirectCount: number; readonly type: number; @@ -11612,7 +11717,9 @@ declare var PerformanceResourceTiming: { new(): PerformanceResourceTiming; }; -/** A legacy interface kept for backwards compatibility and contains properties that offer performance timing information for various events which occur during the loading and use of the current page. You get a PerformanceTiming object describing your page using the window.performance.timing property. */ +/** A legacy interface kept for backwards compatibility and contains properties that offer performance timing information for various events which occur during the loading and use of the current page. You get a PerformanceTiming object describing your page using the window.performance.timing property. + * @deprecated This interface is deprecated in the Navigation Timing Level 2 specification. Please use the PerformanceNavigationTiming interface instead. + */ interface PerformanceTiming { readonly connectEnd: number; readonly connectStart: number; @@ -11755,6 +11862,8 @@ interface PointerEvent extends MouseEvent { readonly tiltY: number; readonly twist: number; readonly width: number; + getCoalescedEvents(): PointerEvent[]; + getPredictedEvents(): PointerEvent[]; } declare var PointerEvent: { @@ -11775,21 +11884,6 @@ declare var PopStateEvent: { new(type: string, eventInitDict?: PopStateEventInit): PopStateEvent; }; -/** The position of the concerned device at a given time. The position, represented by a Coordinates object, comprehends the 2D position of the device, on a spheroid representing the Earth, but also its altitude and its speed. */ -interface Position { - readonly coords: Coordinates; - readonly timestamp: number; -} - -/** The reason of an error occurring when using the geolocating device. */ -interface PositionError { - readonly code: number; - readonly message: string; - readonly PERMISSION_DENIED: number; - readonly POSITION_UNAVAILABLE: number; - readonly TIMEOUT: number; -} - /** A processing instruction embeds application-specific instructions in XML which can be ignored by other applications that don't recognize them. */ interface ProcessingInstruction extends CharacterData, LinkStyle { readonly ownerDocument: Document; @@ -12473,69 +12567,48 @@ declare var Range: { toString(): string; }; -interface ReadableByteStreamController { - readonly byobRequest: ReadableStreamBYOBRequest | undefined; - readonly desiredSize: number | null; - close(): void; - enqueue(chunk: ArrayBufferView): void; - error(error?: any): void; -} - /** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */ interface ReadableStream { readonly locked: boolean; cancel(reason?: any): Promise; - getReader(options: { mode: "byob" }): ReadableStreamBYOBReader; getReader(): ReadableStreamDefaultReader; - pipeThrough({ writable, readable }: { writable: WritableStream, readable: ReadableStream }, options?: PipeOptions): ReadableStream; - pipeTo(dest: WritableStream, options?: PipeOptions): Promise; + pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; + pipeTo(dest: WritableStream, options?: StreamPipeOptions): Promise; tee(): [ReadableStream, ReadableStream]; } declare var ReadableStream: { prototype: ReadableStream; - new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number, size?: undefined }): ReadableStream; new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; }; -interface ReadableStreamBYOBReader { - readonly closed: Promise; - cancel(reason?: any): Promise; - read(view: T): Promise>; - releaseLock(): void; -} - -interface ReadableStreamBYOBRequest { - readonly view: ArrayBufferView; - respond(bytesWritten: number): void; - respondWithNewView(view: ArrayBufferView): void; -} - interface ReadableStreamDefaultController { readonly desiredSize: number | null; close(): void; enqueue(chunk: R): void; - error(error?: any): void; + error(e?: any): void; } -interface ReadableStreamDefaultReader { - readonly closed: Promise; - cancel(reason?: any): Promise; - read(): Promise>; - releaseLock(): void; -} - -interface ReadableStreamReader { - cancel(): Promise; - read(): Promise>; - releaseLock(): void; -} - -declare var ReadableStreamReader: { - prototype: ReadableStreamReader; - new(): ReadableStreamReader; +declare var ReadableStreamDefaultController: { + prototype: ReadableStreamDefaultController; + new(): ReadableStreamDefaultController; }; +interface ReadableStreamDefaultReader extends ReadableStreamGenericReader { + read(): Promise>; + releaseLock(): void; +} + +declare var ReadableStreamDefaultReader: { + prototype: ReadableStreamDefaultReader; + new(stream: ReadableStream): ReadableStreamDefaultReader; +}; + +interface ReadableStreamGenericReader { + readonly closed: Promise; + cancel(reason?: any): Promise; +} + /** This Fetch API interface represents a resource request. */ interface Request extends Body { /** @@ -12606,6 +12679,39 @@ declare var Request: { new(input: RequestInfo, init?: RequestInit): Request; }; +interface ResizeObserver { + disconnect(): void; + observe(target: Element, options?: ResizeObserverOptions): void; + unobserve(target: Element): void; +} + +declare var ResizeObserver: { + prototype: ResizeObserver; + new(callback: ResizeObserverCallback): ResizeObserver; +}; + +interface ResizeObserverEntry { + readonly borderBoxSize: ReadonlyArray; + readonly contentBoxSize: ReadonlyArray; + readonly contentRect: DOMRectReadOnly; + readonly target: Element; +} + +declare var ResizeObserverEntry: { + prototype: ResizeObserverEntry; + new(): ResizeObserverEntry; +}; + +interface ResizeObserverSize { + readonly blockSize: number; + readonly inlineSize: number; +} + +declare var ResizeObserverSize: { + prototype: ResizeObserverSize; + new(): ResizeObserverSize; +}; + /** This Fetch API interface represents the response to a request. */ interface Response extends Body { readonly headers: Headers; @@ -14357,8 +14463,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; - getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeListOf; + getEnclosureList(rect: SVGRect, referenceElement: SVGElement | null): NodeListOf; + getIntersectionList(rect: SVGRect, referenceElement: SVGElement | null): NodeListOf; pauseAnimations(): void; setCurrentTime(seconds: number): void; /** @deprecated */ @@ -14430,7 +14536,7 @@ declare var SVGStringList: { }; /** Corresponds to the SVG