From 1affb914e2db2ee4b533a0f85ea0e4643974f31c Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Mon, 13 Jan 2020 12:56:54 -0800 Subject: [PATCH] Update LKG --- lib/lib.dom.d.ts | 558 +- lib/lib.es2020.bigint.d.ts | 629 + lib/lib.es2020.d.ts | 2 + lib/lib.es2020.promise.d.ts | 50 + lib/lib.es5.d.ts | 2 +- lib/lib.esnext.d.ts | 1 - lib/lib.webworker.d.ts | 145 +- lib/protocol.d.ts | 72 +- lib/tsc.js | 23795 +++++++++++++----------- lib/tsserver.js | 33189 +++++++++++++++++++--------------- lib/tsserverlibrary.d.ts | 823 +- lib/tsserverlibrary.js | 33181 ++++++++++++++++++--------------- lib/typescript.d.ts | 726 +- lib/typescript.js | 32488 ++++++++++++++++++--------------- lib/typescriptServices.d.ts | 726 +- lib/typescriptServices.js | 32488 ++++++++++++++++++--------------- lib/typingsInstaller.js | 27193 +++++++++++++++------------- 17 files changed, 102406 insertions(+), 83662 deletions(-) create mode 100644 lib/lib.es2020.bigint.d.ts create mode 100644 lib/lib.es2020.promise.d.ts diff --git a/lib/lib.dom.d.ts b/lib/lib.dom.d.ts index 4217884bca449..1665e95c9c987 100644 --- a/lib/lib.dom.d.ts +++ b/lib/lib.dom.d.ts @@ -932,6 +932,10 @@ interface OscillatorOptions extends AudioNodeOptions { type?: OscillatorType; } +interface PageTransitionEventInit extends EventInit { + persisted?: boolean; +} + interface PannerOptions extends AudioNodeOptions { coneInnerAngle?: number; coneOuterAngle?: number; @@ -1197,7 +1201,16 @@ interface RTCDtlsParameters { } interface RTCErrorEventInit extends EventInit { - error?: RTCError | null; + error: RTCError; +} + +interface RTCErrorInit { + errorDetail: RTCErrorDetailType; + httpRequestStatusCode?: number; + receivedAlert?: number; + sctpCauseCode?: number; + sdpLineNumber?: number; + sentAlert?: number; } interface RTCIceCandidateAttributes extends RTCStats { @@ -1229,7 +1242,7 @@ interface RTCIceCandidateInit { candidate?: string; sdpMLineIndex?: number | null; sdpMid?: string | null; - usernameFragment?: string; + usernameFragment?: string | null; } interface RTCIceCandidatePair { @@ -1385,6 +1398,7 @@ interface RTCRtpCodingParameters { interface RTCRtpContributingSource { audioLevel?: number; + rtpTimestamp: number; source: number; timestamp: number; } @@ -1398,7 +1412,6 @@ interface RTCRtpEncodingParameters extends RTCRtpCodingParameters { dtx?: RTCDtxStatus; maxBitrate?: number; maxFramerate?: number; - priority?: RTCPriorityType; ptime?: number; scaleResolutionDownBy?: number; } @@ -1442,6 +1455,7 @@ interface RTCRtpRtxParameters { interface RTCRtpSendParameters extends RTCRtpParameters { degradationPreference?: RTCDegradationPreference; encodings: RTCRtpEncodingParameters[]; + priority?: RTCPriorityType; transactionId: string; } @@ -1463,7 +1477,7 @@ interface RTCRtpUnhandled { interface RTCSessionDescriptionInit { sdp?: string; - type: RTCSdpType; + type?: RTCSdpType; } interface RTCSrtpKeyParam { @@ -1516,6 +1530,16 @@ interface RTCTransportStats extends RTCStats { selectedCandidatePairId?: string; } +interface ReadableStreamReadDoneResult { + done: true; + value?: T; +} + +interface ReadableStreamReadValueResult { + done: false; + value: T; +} + interface RegistrationOptions { scope?: string; type?: WorkerType; @@ -1684,6 +1708,25 @@ interface ShadowRootInit { mode: ShadowRootMode; } +interface SpeechSynthesisErrorEventInit extends SpeechSynthesisEventInit { + error: SpeechSynthesisErrorCode; +} + +interface SpeechSynthesisEventInit extends EventInit { + charIndex?: number; + charLength?: number; + elapsedTime?: number; + name?: string; + utterance: SpeechSynthesisUtterance; +} + +interface StaticRangeInit { + endContainer: Node; + endOffset: number; + startContainer: Node; + startOffset: number; +} + interface StereoPannerOptions extends AudioNodeOptions { pan?: number; } @@ -2150,8 +2193,8 @@ interface AudioBuffer { readonly length: number; readonly numberOfChannels: number; readonly sampleRate: number; - copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void; - copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void; + copyFromChannel(destination: Float32Array, channelNumber: number, bufferOffset?: number): void; + copyToChannel(source: Float32Array, channelNumber: number, bufferOffset?: number): void; getChannelData(channel: number): Float32Array; } @@ -2519,7 +2562,10 @@ declare var BiquadFilterNode: { interface Blob { readonly size: number; readonly type: string; + arrayBuffer(): Promise; slice(start?: number, end?: number, contentType?: string): Blob; + stream(): ReadableStream; + text(): Promise; } declare var Blob: { @@ -2835,7 +2881,7 @@ interface CSSStyleDeclaration { clip: string; clipPath: string; clipRule: string; - color: string | null; + color: string; colorInterpolation: string; colorInterpolationFilters: string; columnCount: string; @@ -3012,7 +3058,7 @@ interface CSSStyleDeclaration { msWrapThrough: string; objectFit: string; objectPosition: string; - opacity: string | null; + opacity: string; order: string; orphans: string; outline: string; @@ -3052,14 +3098,14 @@ interface CSSStyleDeclaration { right: string; rotate: string; rowGap: string; - rubyAlign: string | null; + rubyAlign: string; rubyOverhang: string | null; - rubyPosition: string | null; + rubyPosition: string; scale: string; scrollBehavior: string; shapeRendering: string; - stopColor: string | null; - stopOpacity: string | null; + stopColor: string; + stopOpacity: string; stroke: string; strokeDasharray: string; strokeDashoffset: string; @@ -3072,7 +3118,7 @@ interface CSSStyleDeclaration { tableLayout: string; textAlign: string; textAlignLast: string; - textAnchor: string | null; + textAnchor: string; textCombineUpright: string; textDecoration: string; textDecorationColor: string; @@ -3160,7 +3206,8 @@ interface CSSStyleDeclaration { webkitBoxFlex: string; /** @deprecated */ webkitBoxOrdinalGroup: string; - webkitBoxOrient: string | null; + /** @deprecated */ + webkitBoxOrient: string; /** @deprecated */ webkitBoxPack: string; /** @deprecated */ @@ -3364,7 +3411,7 @@ interface CacheStorage { delete(cacheName: string): Promise; has(cacheName: string): Promise; keys(): Promise; - match(request: RequestInfo, options?: CacheQueryOptions): Promise; + match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise; open(cacheName: string): Promise; } @@ -3649,11 +3696,18 @@ declare var ClipboardEvent: { /** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */ interface CloseEvent extends Event { + /** + * Returns the WebSocket connection close code provided by the server. + */ readonly code: number; + /** + * Returns the WebSocket connection close reason provided by the server. + */ readonly reason: string; + /** + * Returns true if the connection closed cleanly; false otherwise. + */ readonly wasClean: boolean; - /** @deprecated */ - initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void; } declare var CloseEvent: { @@ -3827,7 +3881,7 @@ declare var CryptoKeyPair: { }; interface CustomElementRegistry { - define(name: string, constructor: Function, options?: ElementDefinitionOptions): void; + define(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void; get(name: string): any; upgrade(root: Node): void; whenDefined(name: string): Promise; @@ -4036,6 +4090,7 @@ interface DOMMatrixReadOnly { toJSON(): any; transformPoint(point?: DOMPointInit): DOMPoint; translate(tx?: number, ty?: number, tz?: number): DOMMatrix; + toString(): string; } declare var DOMMatrixReadOnly: { @@ -4044,6 +4099,7 @@ declare var DOMMatrixReadOnly: { fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly; fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly; fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly; + toString(): string; }; /** Provides the ability to parse XML or HTML source code from a string into a DOM Document. */ @@ -4201,6 +4257,7 @@ interface DOMTokenList { * Can be set, to change the associated attribute. */ value: string; + toString(): string; /** * Adds all arguments passed, except those already present. * @@ -4341,7 +4398,7 @@ interface DataTransferItem { */ getAsFile(): File | null; /** - * Invokes the callback with the string data as the argument, if the drag data item kind is Plain Unicode string. + * Invokes the callback with the string data as the argument, if the drag data item kind is text. */ getAsString(callback: FunctionStringCallback | null): void; webkitGetAsEntry(): any; @@ -4436,6 +4493,7 @@ interface DeviceMotionEvent extends Event { declare var DeviceMotionEvent: { prototype: DeviceMotionEvent; new(type: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent; + requestPermission(): Promise; }; interface DeviceMotionEventAcceleration { @@ -4461,6 +4519,7 @@ interface DeviceOrientationEvent extends Event { declare var DeviceOrientationEvent: { prototype: DeviceOrientationEvent; new(type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent; + requestPermission(): Promise; }; /** Provides information about the rate at which the device is rotating around all three axes. */ @@ -4499,7 +4558,7 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap, DocumentAndEleme "fullscreenerror": Event; "pointerlockchange": Event; "pointerlockerror": Event; - "readystatechange": ProgressEvent; + "readystatechange": Event; "visibilitychange": Event; } @@ -4509,10 +4568,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Sets or gets the URL for the current document. */ readonly URL: string; - /** - * Gets the object that has the focus when the parent document has focus. - */ - readonly activeElement: Element | null; /** * Sets or gets the color of all active links in the document. */ @@ -4658,7 +4713,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Fires when the state of the object has changed. * @param ev The event */ - onreadystatechange: ((this: Document, ev: ProgressEvent) => any) | null; + onreadystatechange: ((this: Document, ev: Event) => any) | null; onvisibilitychange: ((this: Document, ev: Event) => any) | null; /** * Returns document's origin. @@ -4819,7 +4874,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent; - createEvent(eventInterface: "SpeechRecognitionError"): SpeechRecognitionError; createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; @@ -5069,7 +5123,6 @@ interface DocumentEvent { createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent; - createEvent(eventInterface: "SpeechRecognitionError"): SpeechRecognitionError; createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; @@ -5513,7 +5566,7 @@ interface EventTarget { * * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. * - * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in §2.8 Observing event listeners. + * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners. * * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. * @@ -5754,7 +5807,7 @@ interface GenericTransformStream { */ readonly readable: ReadableStream; /** - * Returns a writable stream which accepts BufferSource chunks and runs them through encoding's decoder before making them available to readable. + * 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. * @@ -5818,7 +5871,6 @@ interface GlobalEventHandlersEventMap { "load": Event; "loadeddata": Event; "loadedmetadata": Event; - "loadend": ProgressEvent; "loadstart": Event; "lostpointercapture": PointerEvent; "mousedown": MouseEvent; @@ -6003,7 +6055,6 @@ interface GlobalEventHandlers { * @param ev The event. */ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null; - onloadend: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null; /** * Occurs when Internet Explorer begins looking for media data. * @param ev The event. @@ -6116,10 +6167,10 @@ interface GlobalEventHandlers { */ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null; ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null; - ontouchcancel: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; - ontouchend: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; - ontouchmove: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; - ontouchstart: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; + ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; + ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; + ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; + ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null; ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null; @@ -6401,12 +6452,9 @@ interface HTMLBodyElement extends HTMLElement, WindowEventHandlers { background: string; /** @deprecated */ bgColor: string; - bgProperties: string; /** @deprecated */ link: string; /** @deprecated */ - noWrap: boolean; - /** @deprecated */ onorientationchange: ((this: HTMLBodyElement, ev: Event) => any) | null; /** @deprecated */ text: string; @@ -6425,10 +6473,6 @@ declare var HTMLBodyElement: { /** Provides properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating