typescript 4.6.0-dev.20220118 → 4.6.0-dev.20220119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.dom.d.ts +145 -59
- package/lib/lib.dom.iterable.d.ts +7 -0
- package/lib/lib.es2015.iterable.d.ts +2 -1
- package/lib/lib.es2020.intl.d.ts +4 -0
- package/lib/lib.es5.d.ts +0 -2
- package/lib/lib.webworker.d.ts +80 -17
- package/lib/lib.webworker.iterable.d.ts +7 -0
- package/lib/protocol.d.ts +1 -0
- package/lib/tsc.js +37 -14
- package/lib/tsserver.js +74 -45
- package/lib/tsserverlibrary.d.ts +2 -0
- package/lib/tsserverlibrary.js +74 -45
- package/lib/typescript.d.ts +1 -0
- package/lib/typescript.js +60 -43
- package/lib/typescriptServices.d.ts +1 -0
- package/lib/typescriptServices.js +60 -43
- package/lib/typingsInstaller.js +41 -15
- package/package.json +1 -1
package/lib/lib.webworker.d.ts
CHANGED
|
@@ -90,8 +90,8 @@ interface CloseEventInit extends EventInit {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
interface CryptoKeyPair {
|
|
93
|
-
privateKey
|
|
94
|
-
publicKey
|
|
93
|
+
privateKey: CryptoKey;
|
|
94
|
+
publicKey: CryptoKey;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
interface CustomEventInit<T = any> extends EventInit {
|
|
@@ -210,6 +210,18 @@ interface FilePropertyBag extends BlobPropertyBag {
|
|
|
210
210
|
lastModified?: number;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
+
interface FileSystemGetDirectoryOptions {
|
|
214
|
+
create?: boolean;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
interface FileSystemGetFileOptions {
|
|
218
|
+
create?: boolean;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
interface FileSystemRemoveOptions {
|
|
222
|
+
recursive?: boolean;
|
|
223
|
+
}
|
|
224
|
+
|
|
213
225
|
interface FontFaceDescriptors {
|
|
214
226
|
display?: string;
|
|
215
227
|
featureSettings?: string;
|
|
@@ -373,7 +385,7 @@ interface NotificationOptions {
|
|
|
373
385
|
requireInteraction?: boolean;
|
|
374
386
|
silent?: boolean;
|
|
375
387
|
tag?: string;
|
|
376
|
-
timestamp?:
|
|
388
|
+
timestamp?: EpochTimeStamp;
|
|
377
389
|
vibrate?: VibratePattern;
|
|
378
390
|
}
|
|
379
391
|
|
|
@@ -422,7 +434,7 @@ interface PushEventInit extends ExtendableEventInit {
|
|
|
422
434
|
|
|
423
435
|
interface PushSubscriptionJSON {
|
|
424
436
|
endpoint?: string;
|
|
425
|
-
expirationTime?:
|
|
437
|
+
expirationTime?: EpochTimeStamp | null;
|
|
426
438
|
keys?: Record<string, string>;
|
|
427
439
|
}
|
|
428
440
|
|
|
@@ -578,7 +590,7 @@ interface StreamPipeOptions {
|
|
|
578
590
|
}
|
|
579
591
|
|
|
580
592
|
interface StructuredSerializeOptions {
|
|
581
|
-
transfer?:
|
|
593
|
+
transfer?: Transferable[];
|
|
582
594
|
}
|
|
583
595
|
|
|
584
596
|
interface TextDecodeOptions {
|
|
@@ -665,7 +677,7 @@ interface AbortController {
|
|
|
665
677
|
/** Returns the AbortSignal object associated with this object. */
|
|
666
678
|
readonly signal: AbortSignal;
|
|
667
679
|
/** Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. */
|
|
668
|
-
abort(): void;
|
|
680
|
+
abort(reason?: any): void;
|
|
669
681
|
}
|
|
670
682
|
|
|
671
683
|
declare var AbortController: {
|
|
@@ -691,7 +703,7 @@ interface AbortSignal extends EventTarget {
|
|
|
691
703
|
declare var AbortSignal: {
|
|
692
704
|
prototype: AbortSignal;
|
|
693
705
|
new(): AbortSignal;
|
|
694
|
-
|
|
706
|
+
abort(reason?: any): AbortSignal;
|
|
695
707
|
};
|
|
696
708
|
|
|
697
709
|
interface AbstractWorkerEventMap {
|
|
@@ -905,6 +917,8 @@ interface Crypto {
|
|
|
905
917
|
/** Available only in secure contexts. */
|
|
906
918
|
readonly subtle: SubtleCrypto;
|
|
907
919
|
getRandomValues<T extends ArrayBufferView | null>(array: T): T;
|
|
920
|
+
/** Available only in secure contexts. */
|
|
921
|
+
randomUUID(): string;
|
|
908
922
|
}
|
|
909
923
|
|
|
910
924
|
declare var Crypto: {
|
|
@@ -1358,8 +1372,10 @@ interface EventSource extends EventTarget {
|
|
|
1358
1372
|
readonly CONNECTING: number;
|
|
1359
1373
|
readonly OPEN: number;
|
|
1360
1374
|
addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1375
|
+
addEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1361
1376
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1362
1377
|
removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1378
|
+
removeEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | EventListenerOptions): void;
|
|
1363
1379
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1364
1380
|
}
|
|
1365
1381
|
|
|
@@ -1518,6 +1534,41 @@ declare var FileReaderSync: {
|
|
|
1518
1534
|
new(): FileReaderSync;
|
|
1519
1535
|
};
|
|
1520
1536
|
|
|
1537
|
+
/** Available only in secure contexts. */
|
|
1538
|
+
interface FileSystemDirectoryHandle extends FileSystemHandle {
|
|
1539
|
+
getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
|
|
1540
|
+
getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
|
|
1541
|
+
removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
|
|
1542
|
+
resolve(possibleDescendant: FileSystemHandle): Promise<string[] | null>;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
declare var FileSystemDirectoryHandle: {
|
|
1546
|
+
prototype: FileSystemDirectoryHandle;
|
|
1547
|
+
new(): FileSystemDirectoryHandle;
|
|
1548
|
+
};
|
|
1549
|
+
|
|
1550
|
+
/** Available only in secure contexts. */
|
|
1551
|
+
interface FileSystemFileHandle extends FileSystemHandle {
|
|
1552
|
+
getFile(): Promise<File>;
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
declare var FileSystemFileHandle: {
|
|
1556
|
+
prototype: FileSystemFileHandle;
|
|
1557
|
+
new(): FileSystemFileHandle;
|
|
1558
|
+
};
|
|
1559
|
+
|
|
1560
|
+
/** Available only in secure contexts. */
|
|
1561
|
+
interface FileSystemHandle {
|
|
1562
|
+
readonly kind: FileSystemHandleKind;
|
|
1563
|
+
readonly name: string;
|
|
1564
|
+
isSameEntry(other: FileSystemHandle): Promise<boolean>;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
declare var FileSystemHandle: {
|
|
1568
|
+
prototype: FileSystemHandle;
|
|
1569
|
+
new(): FileSystemHandle;
|
|
1570
|
+
};
|
|
1571
|
+
|
|
1521
1572
|
interface FontFace {
|
|
1522
1573
|
ascentOverride: string;
|
|
1523
1574
|
descentOverride: string;
|
|
@@ -1981,6 +2032,7 @@ interface IDBTransactionEventMap {
|
|
|
1981
2032
|
interface IDBTransaction extends EventTarget {
|
|
1982
2033
|
/** Returns the transaction's connection. */
|
|
1983
2034
|
readonly db: IDBDatabase;
|
|
2035
|
+
readonly durability: IDBTransactionDurability;
|
|
1984
2036
|
/** If the transaction was aborted, returns the error (a DOMException) providing the reason. */
|
|
1985
2037
|
readonly error: DOMException | null;
|
|
1986
2038
|
/** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */
|
|
@@ -2481,7 +2533,7 @@ declare var PushEvent: {
|
|
|
2481
2533
|
*/
|
|
2482
2534
|
interface PushManager {
|
|
2483
2535
|
getSubscription(): Promise<PushSubscription | null>;
|
|
2484
|
-
permissionState(options?: PushSubscriptionOptionsInit): Promise<
|
|
2536
|
+
permissionState(options?: PushSubscriptionOptionsInit): Promise<PermissionState>;
|
|
2485
2537
|
subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
|
|
2486
2538
|
}
|
|
2487
2539
|
|
|
@@ -2798,6 +2850,7 @@ declare var SharedWorkerGlobalScope: {
|
|
|
2798
2850
|
/** Available only in secure contexts. */
|
|
2799
2851
|
interface StorageManager {
|
|
2800
2852
|
estimate(): Promise<StorageEstimate>;
|
|
2853
|
+
getDirectory(): Promise<FileSystemDirectoryHandle>;
|
|
2801
2854
|
persisted(): Promise<boolean>;
|
|
2802
2855
|
}
|
|
2803
2856
|
|
|
@@ -3134,6 +3187,13 @@ interface WEBGL_lose_context {
|
|
|
3134
3187
|
restoreContext(): void;
|
|
3135
3188
|
}
|
|
3136
3189
|
|
|
3190
|
+
interface WEBGL_multi_draw {
|
|
3191
|
+
multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
|
|
3192
|
+
multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, drawcount: GLsizei): void;
|
|
3193
|
+
multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
|
|
3194
|
+
multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, drawcount: GLsizei): void;
|
|
3195
|
+
}
|
|
3196
|
+
|
|
3137
3197
|
interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
|
|
3138
3198
|
}
|
|
3139
3199
|
|
|
@@ -5075,7 +5135,7 @@ declare var WebSocket: {
|
|
|
5075
5135
|
/** This ServiceWorker API interface represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources. */
|
|
5076
5136
|
interface WindowClient extends Client {
|
|
5077
5137
|
readonly focused: boolean;
|
|
5078
|
-
readonly visibilityState:
|
|
5138
|
+
readonly visibilityState: DocumentVisibilityState;
|
|
5079
5139
|
focus(): Promise<WindowClient>;
|
|
5080
5140
|
navigate(url: string | URL): Promise<WindowClient | null>;
|
|
5081
5141
|
}
|
|
@@ -5096,12 +5156,13 @@ interface WindowOrWorkerGlobalScope {
|
|
|
5096
5156
|
readonly performance: Performance;
|
|
5097
5157
|
atob(data: string): string;
|
|
5098
5158
|
btoa(data: string): string;
|
|
5099
|
-
clearInterval(
|
|
5100
|
-
clearTimeout(
|
|
5159
|
+
clearInterval(id?: number): void;
|
|
5160
|
+
clearTimeout(id?: number): void;
|
|
5101
5161
|
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5102
5162
|
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5103
5163
|
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
5104
5164
|
queueMicrotask(callback: VoidFunction): void;
|
|
5165
|
+
reportError(e: any): void;
|
|
5105
5166
|
setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
5106
5167
|
setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
5107
5168
|
}
|
|
@@ -5518,7 +5579,7 @@ declare namespace WebAssembly {
|
|
|
5518
5579
|
|
|
5519
5580
|
type ImportExportKind = "function" | "global" | "memory" | "table";
|
|
5520
5581
|
type TableKind = "anyfunc" | "externref";
|
|
5521
|
-
type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64";
|
|
5582
|
+
type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
|
|
5522
5583
|
type ExportValue = Function | Global | Memory | Table;
|
|
5523
5584
|
type Exports = Record<string, ExportValue>;
|
|
5524
5585
|
type ImportValue = ExportValue | number;
|
|
@@ -5630,12 +5691,13 @@ declare var origin: string;
|
|
|
5630
5691
|
declare var performance: Performance;
|
|
5631
5692
|
declare function atob(data: string): string;
|
|
5632
5693
|
declare function btoa(data: string): string;
|
|
5633
|
-
declare function clearInterval(
|
|
5634
|
-
declare function clearTimeout(
|
|
5694
|
+
declare function clearInterval(id?: number): void;
|
|
5695
|
+
declare function clearTimeout(id?: number): void;
|
|
5635
5696
|
declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5636
5697
|
declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5637
5698
|
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
5638
5699
|
declare function queueMicrotask(callback: VoidFunction): void;
|
|
5700
|
+
declare function reportError(e: any): void;
|
|
5639
5701
|
declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
5640
5702
|
declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
5641
5703
|
declare function cancelAnimationFrame(handle: number): void;
|
|
@@ -5652,7 +5714,7 @@ type BodyInit = ReadableStream | XMLHttpRequestBodyInit;
|
|
|
5652
5714
|
type BufferSource = ArrayBufferView | ArrayBuffer;
|
|
5653
5715
|
type CanvasImageSource = ImageBitmap | OffscreenCanvas;
|
|
5654
5716
|
type DOMHighResTimeStamp = number;
|
|
5655
|
-
type
|
|
5717
|
+
type EpochTimeStamp = number;
|
|
5656
5718
|
type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
|
|
5657
5719
|
type Float32List = Float32Array | GLfloat[];
|
|
5658
5720
|
type FormDataEntryValue = File | string;
|
|
@@ -5693,13 +5755,16 @@ type ClientTypes = "all" | "sharedworker" | "window" | "worker";
|
|
|
5693
5755
|
type ColorGamut = "p3" | "rec2020" | "srgb";
|
|
5694
5756
|
type ColorSpaceConversion = "default" | "none";
|
|
5695
5757
|
type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "mixed" | "none" | "other" | "unknown" | "wifi";
|
|
5758
|
+
type DocumentVisibilityState = "hidden" | "visible";
|
|
5696
5759
|
type EndingType = "native" | "transparent";
|
|
5760
|
+
type FileSystemHandleKind = "directory" | "file";
|
|
5697
5761
|
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
5698
5762
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
5699
5763
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
5700
5764
|
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
|
|
5701
5765
|
type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
|
|
5702
5766
|
type IDBRequestReadyState = "done" | "pending";
|
|
5767
|
+
type IDBTransactionDurability = "default" | "relaxed" | "strict";
|
|
5703
5768
|
type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
|
|
5704
5769
|
type ImageOrientation = "flipY" | "none";
|
|
5705
5770
|
type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
|
|
@@ -5714,7 +5779,6 @@ type PermissionState = "denied" | "granted" | "prompt";
|
|
|
5714
5779
|
type PredefinedColorSpace = "display-p3" | "srgb";
|
|
5715
5780
|
type PremultiplyAlpha = "default" | "none" | "premultiply";
|
|
5716
5781
|
type PushEncryptionKeyName = "auth" | "p256dh";
|
|
5717
|
-
type PushPermissionState = "denied" | "granted" | "prompt";
|
|
5718
5782
|
type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
|
|
5719
5783
|
type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
|
|
5720
5784
|
type RequestCredentials = "include" | "omit" | "same-origin";
|
|
@@ -5727,7 +5791,6 @@ type SecurityPolicyViolationEventDisposition = "enforce" | "report";
|
|
|
5727
5791
|
type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
|
|
5728
5792
|
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
|
|
5729
5793
|
type TransferFunction = "hlg" | "pq" | "srgb";
|
|
5730
|
-
type VisibilityState = "hidden" | "visible";
|
|
5731
5794
|
type WebGLPowerPreference = "default" | "high-performance" | "low-power";
|
|
5732
5795
|
type WorkerType = "classic" | "module";
|
|
5733
5796
|
type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
|
|
@@ -100,6 +100,13 @@ interface WEBGL_draw_buffers {
|
|
|
100
100
|
drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
interface WEBGL_multi_draw {
|
|
104
|
+
multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void;
|
|
105
|
+
multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, drawcount: GLsizei): void;
|
|
106
|
+
multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void;
|
|
107
|
+
multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, drawcount: GLsizei): void;
|
|
108
|
+
}
|
|
109
|
+
|
|
103
110
|
interface WebGL2RenderingContextBase {
|
|
104
111
|
clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void;
|
|
105
112
|
clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void;
|
package/lib/protocol.d.ts
CHANGED
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.6";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220119";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
function tryGetNativeMap() {
|
|
@@ -36576,22 +36576,27 @@ var ts;
|
|
|
36576
36576
|
}
|
|
36577
36577
|
return state;
|
|
36578
36578
|
}
|
|
36579
|
-
function onLeft(left, state,
|
|
36579
|
+
function onLeft(left, state, node) {
|
|
36580
36580
|
if (!state.skip) {
|
|
36581
|
-
|
|
36581
|
+
var maybeBound = maybeBind(left);
|
|
36582
|
+
if (node.operatorToken.kind === 27) {
|
|
36583
|
+
maybeBindExpressionFlowIfCall(left);
|
|
36584
|
+
}
|
|
36585
|
+
return maybeBound;
|
|
36582
36586
|
}
|
|
36583
36587
|
}
|
|
36584
|
-
function onOperator(operatorToken, state,
|
|
36588
|
+
function onOperator(operatorToken, state, _node) {
|
|
36585
36589
|
if (!state.skip) {
|
|
36586
|
-
if (operatorToken.kind === 27) {
|
|
36587
|
-
maybeBindExpressionFlowIfCall(node.left);
|
|
36588
|
-
}
|
|
36589
36590
|
bind(operatorToken);
|
|
36590
36591
|
}
|
|
36591
36592
|
}
|
|
36592
|
-
function onRight(right, state,
|
|
36593
|
+
function onRight(right, state, node) {
|
|
36593
36594
|
if (!state.skip) {
|
|
36594
|
-
|
|
36595
|
+
var maybeBound = maybeBind(right);
|
|
36596
|
+
if (node.operatorToken.kind === 27) {
|
|
36597
|
+
maybeBindExpressionFlowIfCall(right);
|
|
36598
|
+
}
|
|
36599
|
+
return maybeBound;
|
|
36595
36600
|
}
|
|
36596
36601
|
}
|
|
36597
36602
|
function onExit(node, state) {
|
|
@@ -41901,6 +41906,7 @@ var ts;
|
|
|
41901
41906
|
getCommonSourceDirectory: !!host.getCommonSourceDirectory ? function () { return host.getCommonSourceDirectory(); } : function () { return ""; },
|
|
41902
41907
|
getCurrentDirectory: function () { return host.getCurrentDirectory(); },
|
|
41903
41908
|
getSymlinkCache: ts.maybeBind(host, host.getSymlinkCache),
|
|
41909
|
+
getPackageJsonInfoCache: function () { var _a; return (_a = host.getPackageJsonInfoCache) === null || _a === void 0 ? void 0 : _a.call(host); },
|
|
41904
41910
|
useCaseSensitiveFileNames: ts.maybeBind(host, host.useCaseSensitiveFileNames),
|
|
41905
41911
|
redirectTargetsMap: host.redirectTargetsMap,
|
|
41906
41912
|
getProjectReferenceRedirect: function (fileName) { return host.getProjectReferenceRedirect(fileName); },
|
|
@@ -79784,10 +79790,16 @@ var ts;
|
|
|
79784
79790
|
var _a;
|
|
79785
79791
|
var nonWhitespaceChildren = ts.getSemanticJsxChildren(children);
|
|
79786
79792
|
var isStaticChildren = ts.length(nonWhitespaceChildren) > 1 || !!((_a = nonWhitespaceChildren[0]) === null || _a === void 0 ? void 0 : _a.dotDotDotToken);
|
|
79787
|
-
var args = [tagName, objectProperties
|
|
79793
|
+
var args = [tagName, objectProperties];
|
|
79794
|
+
if (keyAttr) {
|
|
79795
|
+
args.push(transformJsxAttributeInitializer(keyAttr.initializer));
|
|
79796
|
+
}
|
|
79788
79797
|
if (compilerOptions.jsx === 5) {
|
|
79789
79798
|
var originalFile = ts.getOriginalNode(currentSourceFile);
|
|
79790
79799
|
if (originalFile && ts.isSourceFile(originalFile)) {
|
|
79800
|
+
if (keyAttr === undefined) {
|
|
79801
|
+
args.push(factory.createVoidZero());
|
|
79802
|
+
}
|
|
79791
79803
|
args.push(isStaticChildren ? factory.createTrue() : factory.createFalse());
|
|
79792
79804
|
var lineCol = ts.getLineAndCharacterOfPosition(originalFile, location.pos);
|
|
79793
79805
|
args.push(factory.createObjectLiteralExpression([
|
|
@@ -98634,11 +98646,12 @@ var ts;
|
|
|
98634
98646
|
};
|
|
98635
98647
|
}
|
|
98636
98648
|
function isFormatRequiringExtensions(compilerOptions, importingSourceFileName, host) {
|
|
98649
|
+
var _a;
|
|
98637
98650
|
if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node12
|
|
98638
98651
|
&& ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
|
|
98639
98652
|
return false;
|
|
98640
98653
|
}
|
|
98641
|
-
return ts.getImpliedNodeFormatForFile(importingSourceFileName,
|
|
98654
|
+
return ts.getImpliedNodeFormatForFile(importingSourceFileName, (_a = host.getPackageJsonInfoCache) === null || _a === void 0 ? void 0 : _a.call(host), getModuleResolutionHost(host), compilerOptions) !== ts.ModuleKind.CommonJS;
|
|
98642
98655
|
}
|
|
98643
98656
|
function getModuleResolutionHost(host) {
|
|
98644
98657
|
var _a;
|
|
@@ -99111,11 +99124,13 @@ var ts;
|
|
|
99111
99124
|
var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName);
|
|
99112
99125
|
return ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Classic && packageName === nodeModulesDirectoryName ? undefined : packageName;
|
|
99113
99126
|
function tryDirectoryWithPackageJson(packageRootIndex) {
|
|
99127
|
+
var _a, _b;
|
|
99114
99128
|
var packageRootPath = path.substring(0, packageRootIndex);
|
|
99115
99129
|
var packageJsonPath = ts.combinePaths(packageRootPath, "package.json");
|
|
99116
99130
|
var moduleFileToTry = path;
|
|
99117
|
-
|
|
99118
|
-
|
|
99131
|
+
var cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) === null || _a === void 0 ? void 0 : _a.call(host)) === null || _b === void 0 ? void 0 : _b.getPackageJsonInfo(packageJsonPath);
|
|
99132
|
+
if (typeof cachedPackageJson === "object" || cachedPackageJson === undefined && host.fileExists(packageJsonPath)) {
|
|
99133
|
+
var packageJsonContent = (cachedPackageJson === null || cachedPackageJson === void 0 ? void 0 : cachedPackageJson.packageJsonContent) || JSON.parse(host.readFile(packageJsonPath));
|
|
99119
99134
|
if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
|
|
99120
99135
|
var conditions = ["node", importingSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext ? "import" : "require", "types"];
|
|
99121
99136
|
var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string"
|
|
@@ -99885,6 +99900,7 @@ var ts;
|
|
|
99885
99900
|
var sharedExtendedConfigFileWatchers;
|
|
99886
99901
|
var extendedConfigCache = host.extendedConfigCache;
|
|
99887
99902
|
var changesAffectResolution = false;
|
|
99903
|
+
var reportFileChangeDetectedOnCreateProgram = false;
|
|
99888
99904
|
var sourceFilesCache = new ts.Map();
|
|
99889
99905
|
var missingFilePathsRequestedForRelease;
|
|
99890
99906
|
var hasChangedCompilerOptions = false;
|
|
@@ -100038,14 +100054,21 @@ var ts;
|
|
|
100038
100054
|
var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution);
|
|
100039
100055
|
if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
|
|
100040
100056
|
if (hasChangedConfigFileParsingErrors) {
|
|
100057
|
+
if (reportFileChangeDetectedOnCreateProgram) {
|
|
100058
|
+
reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
100059
|
+
}
|
|
100041
100060
|
builderProgram = createProgram(undefined, undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences);
|
|
100042
100061
|
hasChangedConfigFileParsingErrors = false;
|
|
100043
100062
|
}
|
|
100044
100063
|
}
|
|
100045
100064
|
else {
|
|
100065
|
+
if (reportFileChangeDetectedOnCreateProgram) {
|
|
100066
|
+
reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation);
|
|
100067
|
+
}
|
|
100046
100068
|
createNewProgram(hasInvalidatedResolution);
|
|
100047
100069
|
}
|
|
100048
100070
|
changesAffectResolution = false;
|
|
100071
|
+
reportFileChangeDetectedOnCreateProgram = false;
|
|
100049
100072
|
if (host.afterProgramCreate && program !== builderProgram) {
|
|
100050
100073
|
host.afterProgramCreate(builderProgram);
|
|
100051
100074
|
}
|
|
@@ -100224,7 +100247,7 @@ var ts;
|
|
|
100224
100247
|
}
|
|
100225
100248
|
function updateProgramWithWatchStatus() {
|
|
100226
100249
|
timerToUpdateProgram = undefined;
|
|
100227
|
-
|
|
100250
|
+
reportFileChangeDetectedOnCreateProgram = true;
|
|
100228
100251
|
updateProgram();
|
|
100229
100252
|
}
|
|
100230
100253
|
function updateProgram() {
|