From 00e15811f59eba6d923c8338af3dca6bb37cf68c Mon Sep 17 00:00:00 2001 From: Tim van der Lippe Date: Wed, 19 Feb 2020 17:42:51 +0000 Subject: [PATCH] Update TypeScript to 3.8.1RC This fixes an issue where property assignments to static methods (please don't ask me why we have them) would erroneously omit the static method from the declaration file. This is fixed in the latest version of TypeScript, most likely as part of https://github.com/microsoft/TypeScript/issues/36270 DISABLE_THIRD_PARTY_CHECK=Updating TypeScript Bug: 1011811 Change-Id: I2744ef44c040fdf001f6b0be9e64a164510e0fea Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2064668 Reviewed-by: Jack Franklin Commit-Queue: Tim van der Lippe --- node_modules/typescript/README.md | 6 +- .../typescript/lib/cancellationToken.js | 8 +- .../lib/ja/diagnosticMessages.generated.json | 2 +- node_modules/typescript/lib/lib.dom.d.ts | 558 +- .../typescript/lib/lib.es2019.symbol.d.ts | 4 +- .../typescript/lib/lib.es2020.bigint.d.ts | 629 + node_modules/typescript/lib/lib.es2020.d.ts | 2 + .../typescript/lib/lib.es2020.promise.d.ts | 50 + node_modules/typescript/lib/lib.es5.d.ts | 14 +- .../typescript/lib/lib.esnext.bigint.d.ts | 1224 +- node_modules/typescript/lib/lib.esnext.d.ts | 1 - .../typescript/lib/lib.webworker.d.ts | 145 +- node_modules/typescript/lib/protocol.d.ts | 102 +- node_modules/typescript/lib/tsc.js | 25413 ++++++----- node_modules/typescript/lib/tsserver.js | 36196 +++++++++------- .../typescript/lib/tsserverlibrary.d.ts | 882 +- .../typescript/lib/tsserverlibrary.js | 36184 ++++++++------- node_modules/typescript/lib/typescript.d.ts | 753 +- node_modules/typescript/lib/typescript.js | 35356 ++++++++------- .../typescript/lib/typescriptServices.d.ts | 753 +- .../typescript/lib/typescriptServices.js | 35356 ++++++++------- .../typescript/lib/typingsInstaller.js | 29098 +++++++------ .../zh-tw/diagnosticMessages.generated.json | 2 +- node_modules/typescript/package.json | 6 +- package-lock.json | 406 +- package.json | 2 +- scripts/deps/manage_node_deps.py | 2 +- 27 files changed, 114254 insertions(+), 88900 deletions(-) create mode 100644 node_modules/typescript/lib/lib.es2020.bigint.d.ts create mode 100644 node_modules/typescript/lib/lib.es2020.promise.d.ts diff --git a/node_modules/typescript/README.md b/node_modules/typescript/README.md index 459cebe95b9..a422999ce19 100644 --- a/node_modules/typescript/README.md +++ b/node_modules/typescript/README.md @@ -1,16 +1,15 @@ # TypeScript -[![Join the chat at https://gitter.im/microsoft/TypeScript](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/microsoft/TypeScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/microsoft/TypeScript) [![VSTS Build Status](https://dev.azure.com/typescript/TypeScript/_apis/build/status/Typescript/node10)](https://dev.azure.com/typescript/TypeScript/_build/latest?definitionId=4&view=logs) [![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript) [![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript) - - [TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript). +Find others who are using TypeScript at [our community page](https://www.typescriptlang.org/community/). + ## Installing For the latest stable version: @@ -31,6 +30,7 @@ There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob * [Submit bugs](https://github.com/microsoft/TypeScript/issues) and help us verify fixes as they are checked in. * Review the [source code changes](https://github.com/microsoft/TypeScript/pulls). * Engage with other TypeScript users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/typescript). +* Help each other in the [TypeScript Community Discord](https://discord.gg/typescript). * Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter. * [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/master/CONTRIBUTING.md). * Read the language specification ([docx](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true), diff --git a/node_modules/typescript/lib/cancellationToken.js b/node_modules/typescript/lib/cancellationToken.js index d63145f3fc5..12a1e5b265b 100644 --- a/node_modules/typescript/lib/cancellationToken.js +++ b/node_modules/typescript/lib/cancellationToken.js @@ -17,13 +17,7 @@ and limitations under the License. "use strict"; var fs = require("fs"); function pipeExists(name) { - try { - fs.statSync(name); - return true; - } - catch (e) { - return false; - } + return fs.existsSync(name); } function createCancellationToken(args) { var cancellationPipeName; diff --git a/node_modules/typescript/lib/ja/diagnosticMessages.generated.json b/node_modules/typescript/lib/ja/diagnosticMessages.generated.json index 751357dbc01..a05d953fe14 100644 --- a/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +++ b/node_modules/typescript/lib/ja/diagnosticMessages.generated.json @@ -454,7 +454,7 @@ "Generic_type_0_requires_1_type_argument_s_2314": "ジェネリック型 '{0}' には {1} 個の型引数が必要です。", "Generic_type_0_requires_between_1_and_2_type_arguments_2707": "ジェネリック型 '{0}' には、{1} 個から {2} 個までの型引数が必要です。", "Generic_type_instantiation_is_excessively_deep_and_possibly_infinite_2550": "ジェネリック型のインスタンス化は非常に深く、無限である可能性があります。", - "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "ゲッターおよびセッターで表示が許可されていません。", + "Getter_and_setter_accessors_do_not_agree_in_visibility_2379": "ゲッターおよびセッターでの表示が許可されていません。", "Global_module_exports_may_only_appear_at_top_level_1316": "グローバル モジュールのエクスポートは最上位レベルにのみ出現可能です。", "Global_module_exports_may_only_appear_in_declaration_files_1315": "グローバル モジュールのエクスポートは宣言ファイルにのみ出現可能です。", "Global_module_exports_may_only_appear_in_module_files_1314": "グローバル モジュールのエクスポートはモジュール ファイルにのみ出現可能です。", diff --git a/node_modules/typescript/lib/lib.dom.d.ts b/node_modules/typescript/lib/lib.dom.d.ts index 124a0859079..9551eb9836e 100644 --- a/node_modules/typescript/lib/lib.dom.d.ts +++ b/node_modules/typescript/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