@typescript-deploys/pr-build 5.0.0-pr-52280-2 → 5.0.0-pr-52280-7
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/tsc.js +478 -400
- package/lib/tsserver.js +521 -416
- package/lib/tsserverlibrary.d.ts +76 -22
- package/lib/tsserverlibrary.js +517 -416
- package/lib/typescript.d.ts +66 -18
- package/lib/typescript.js +512 -416
- package/lib/typingsInstaller.js +201 -191
- package/package.json +2 -2
package/lib/typescript.d.ts
CHANGED
|
@@ -3887,10 +3887,10 @@ declare namespace ts {
|
|
|
3887
3887
|
updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReadonlyTag;
|
|
3888
3888
|
createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocUnknownTag;
|
|
3889
3889
|
updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocComment> | undefined): JSDocUnknownTag;
|
|
3890
|
-
createJSDocDeprecatedTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
|
|
3891
|
-
updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
|
|
3892
|
-
createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
|
|
3893
|
-
updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
|
|
3890
|
+
createJSDocDeprecatedTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
|
|
3891
|
+
updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
|
|
3892
|
+
createJSDocOverrideTag(tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
|
|
3893
|
+
updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier | undefined, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
|
|
3894
3894
|
createJSDocThrowsTag(tagName: Identifier, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment>): JSDocThrowsTag;
|
|
3895
3895
|
updateJSDocThrowsTag(node: JSDocThrowsTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment> | undefined): JSDocThrowsTag;
|
|
3896
3896
|
createJSDocSatisfiesTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocSatisfiesTag;
|
|
@@ -4257,16 +4257,39 @@ declare namespace ts {
|
|
|
4257
4257
|
/**
|
|
4258
4258
|
* A function that accepts and possibly transforms a node.
|
|
4259
4259
|
*/
|
|
4260
|
-
type Visitor = (node:
|
|
4260
|
+
type Visitor<TIn extends Node = Node, TOut extends Node | undefined = TIn | undefined> = (node: TIn) => VisitResult<TOut>;
|
|
4261
|
+
/**
|
|
4262
|
+
* A function that walks a node using the given visitor, lifting node arrays into single nodes,
|
|
4263
|
+
* returning an node which satisfies the test.
|
|
4264
|
+
*
|
|
4265
|
+
* - If the input node is undefined, then the output is undefined.
|
|
4266
|
+
* - If the visitor returns undefined, then the output is undefined.
|
|
4267
|
+
* - If the output node is not undefined, then it will satisfy the test function.
|
|
4268
|
+
* - In order to obtain a return type that is more specific than `Node`, a test
|
|
4269
|
+
* function _must_ be provided, and that function must be a type predicate.
|
|
4270
|
+
*
|
|
4271
|
+
* For the canonical implementation of this type, @see {visitNode}.
|
|
4272
|
+
*/
|
|
4261
4273
|
interface NodeVisitor {
|
|
4262
|
-
<
|
|
4263
|
-
<
|
|
4274
|
+
<TIn extends Node | undefined, TVisited extends Node | undefined, TOut extends Node>(node: TIn, visitor: Visitor<NonNullable<TIn>, TVisited>, test: (node: Node) => node is TOut, lift?: (node: readonly Node[]) => Node): TOut | (TIn & undefined) | (TVisited & undefined);
|
|
4275
|
+
<TIn extends Node | undefined, TVisited extends Node | undefined>(node: TIn, visitor: Visitor<NonNullable<TIn>, TVisited>, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => Node): Node | (TIn & undefined) | (TVisited & undefined);
|
|
4264
4276
|
}
|
|
4277
|
+
/**
|
|
4278
|
+
* A function that walks a node array using the given visitor, returning an array whose contents satisfy the test.
|
|
4279
|
+
*
|
|
4280
|
+
* - If the input node array is undefined, the output is undefined.
|
|
4281
|
+
* - If the visitor can return undefined, the node it visits in the array will be reused.
|
|
4282
|
+
* - If the output node array is not undefined, then its contents will satisfy the test.
|
|
4283
|
+
* - In order to obtain a return type that is more specific than `NodeArray<Node>`, a test
|
|
4284
|
+
* function _must_ be provided, and that function must be a type predicate.
|
|
4285
|
+
*
|
|
4286
|
+
* For the canonical implementation of this type, @see {visitNodes}.
|
|
4287
|
+
*/
|
|
4265
4288
|
interface NodesVisitor {
|
|
4266
|
-
<
|
|
4267
|
-
<
|
|
4289
|
+
<TIn extends Node, TInArray extends NodeArray<TIn> | undefined, TOut extends Node>(nodes: TInArray, visitor: Visitor<TIn, Node | undefined>, test: (node: Node) => node is TOut, start?: number, count?: number): NodeArray<TOut> | (TInArray & undefined);
|
|
4290
|
+
<TIn extends Node, TInArray extends NodeArray<TIn> | undefined>(nodes: TInArray, visitor: Visitor<TIn, Node | undefined>, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<Node> | (TInArray & undefined);
|
|
4268
4291
|
}
|
|
4269
|
-
type VisitResult<T extends Node> = T | readonly
|
|
4292
|
+
type VisitResult<T extends Node | undefined> = T | readonly Node[];
|
|
4270
4293
|
interface Printer {
|
|
4271
4294
|
/**
|
|
4272
4295
|
* Print a node and its subtree as-is, without any emit transformations.
|
|
@@ -4480,6 +4503,7 @@ declare namespace ts {
|
|
|
4480
4503
|
}
|
|
4481
4504
|
type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind, modifiedTime?: Date) => void;
|
|
4482
4505
|
type DirectoryWatcherCallback = (fileName: string) => void;
|
|
4506
|
+
type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex";
|
|
4483
4507
|
interface System {
|
|
4484
4508
|
args: string[];
|
|
4485
4509
|
newLine: string;
|
|
@@ -4538,8 +4562,8 @@ declare namespace ts {
|
|
|
4538
4562
|
function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
|
|
4539
4563
|
function forEachTrailingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;
|
|
4540
4564
|
function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
|
|
4541
|
-
function reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T
|
|
4542
|
-
function reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T
|
|
4565
|
+
function reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T, initial: U): U | undefined;
|
|
4566
|
+
function reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T, initial: U): U | undefined;
|
|
4543
4567
|
function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
|
|
4544
4568
|
function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
|
|
4545
4569
|
/** Optionally, get the shebang */
|
|
@@ -4618,7 +4642,7 @@ declare namespace ts {
|
|
|
4618
4642
|
function getTypeParameterOwner(d: Declaration): Declaration | undefined;
|
|
4619
4643
|
function isParameterPropertyDeclaration(node: Node, parent: Node): node is ParameterPropertyDeclaration;
|
|
4620
4644
|
function isEmptyBindingPattern(node: BindingName): node is BindingPattern;
|
|
4621
|
-
function isEmptyBindingElement(node: BindingElement): boolean;
|
|
4645
|
+
function isEmptyBindingElement(node: BindingElement | ArrayBindingElement): boolean;
|
|
4622
4646
|
function walkUpBindingElementsAndPatterns(binding: BindingElement): VariableDeclaration | ParameterDeclaration;
|
|
4623
4647
|
function getCombinedModifierFlags(node: Declaration): ModifierFlags;
|
|
4624
4648
|
function getCombinedNodeFlags(node: Node): NodeFlags;
|
|
@@ -4635,7 +4659,7 @@ declare namespace ts {
|
|
|
4635
4659
|
function getOriginalNode(node: Node): Node;
|
|
4636
4660
|
function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
|
|
4637
4661
|
function getOriginalNode(node: Node | undefined): Node | undefined;
|
|
4638
|
-
function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node
|
|
4662
|
+
function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node) => node is T): T | undefined;
|
|
4639
4663
|
/**
|
|
4640
4664
|
* Iterates through the parent chain of a node and performs the callback on each parent until the callback
|
|
4641
4665
|
* returns a truthy value, then returns that value.
|
|
@@ -5353,41 +5377,65 @@ declare namespace ts {
|
|
|
5353
5377
|
/**
|
|
5354
5378
|
* Visits a Node using the supplied visitor, possibly returning a new Node in its place.
|
|
5355
5379
|
*
|
|
5380
|
+
* - If the input node is undefined, then the output is undefined.
|
|
5381
|
+
* - If the visitor returns undefined, then the output is undefined.
|
|
5382
|
+
* - If the output node is not undefined, then it will satisfy the test function.
|
|
5383
|
+
* - In order to obtain a return type that is more specific than `Node`, a test
|
|
5384
|
+
* function _must_ be provided, and that function must be a type predicate.
|
|
5385
|
+
*
|
|
5356
5386
|
* @param node The Node to visit.
|
|
5357
5387
|
* @param visitor The callback used to visit the Node.
|
|
5358
5388
|
* @param test A callback to execute to verify the Node is valid.
|
|
5359
5389
|
* @param lift An optional callback to execute to lift a NodeArray into a valid Node.
|
|
5360
5390
|
*/
|
|
5361
|
-
function visitNode<
|
|
5391
|
+
function visitNode<TIn extends Node | undefined, TVisited extends Node | undefined, TOut extends Node>(node: TIn, visitor: Visitor<NonNullable<TIn>, TVisited>, test: (node: Node) => node is TOut, lift?: (node: readonly Node[]) => Node): TOut | (TIn & undefined) | (TVisited & undefined);
|
|
5362
5392
|
/**
|
|
5363
5393
|
* Visits a Node using the supplied visitor, possibly returning a new Node in its place.
|
|
5364
5394
|
*
|
|
5395
|
+
* - If the input node is undefined, then the output is undefined.
|
|
5396
|
+
* - If the visitor returns undefined, then the output is undefined.
|
|
5397
|
+
* - If the output node is not undefined, then it will satisfy the test function.
|
|
5398
|
+
* - In order to obtain a return type that is more specific than `Node`, a test
|
|
5399
|
+
* function _must_ be provided, and that function must be a type predicate.
|
|
5400
|
+
*
|
|
5365
5401
|
* @param node The Node to visit.
|
|
5366
5402
|
* @param visitor The callback used to visit the Node.
|
|
5367
5403
|
* @param test A callback to execute to verify the Node is valid.
|
|
5368
5404
|
* @param lift An optional callback to execute to lift a NodeArray into a valid Node.
|
|
5369
5405
|
*/
|
|
5370
|
-
function visitNode<
|
|
5406
|
+
function visitNode<TIn extends Node | undefined, TVisited extends Node | undefined>(node: TIn, visitor: Visitor<NonNullable<TIn>, TVisited>, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => Node): Node | (TIn & undefined) | (TVisited & undefined);
|
|
5371
5407
|
/**
|
|
5372
5408
|
* Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
|
|
5373
5409
|
*
|
|
5410
|
+
* - If the input node array is undefined, the output is undefined.
|
|
5411
|
+
* - If the visitor can return undefined, the node it visits in the array will be reused.
|
|
5412
|
+
* - If the output node array is not undefined, then its contents will satisfy the test.
|
|
5413
|
+
* - In order to obtain a return type that is more specific than `NodeArray<Node>`, a test
|
|
5414
|
+
* function _must_ be provided, and that function must be a type predicate.
|
|
5415
|
+
*
|
|
5374
5416
|
* @param nodes The NodeArray to visit.
|
|
5375
5417
|
* @param visitor The callback used to visit a Node.
|
|
5376
5418
|
* @param test A node test to execute for each node.
|
|
5377
5419
|
* @param start An optional value indicating the starting offset at which to start visiting.
|
|
5378
5420
|
* @param count An optional value indicating the maximum number of nodes to visit.
|
|
5379
5421
|
*/
|
|
5380
|
-
function visitNodes<
|
|
5422
|
+
function visitNodes<TIn extends Node, TInArray extends NodeArray<TIn> | undefined, TOut extends Node>(nodes: TInArray, visitor: Visitor<TIn, Node | undefined>, test: (node: Node) => node is TOut, start?: number, count?: number): NodeArray<TOut> | (TInArray & undefined);
|
|
5381
5423
|
/**
|
|
5382
5424
|
* Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
|
|
5383
5425
|
*
|
|
5426
|
+
* - If the input node array is undefined, the output is undefined.
|
|
5427
|
+
* - If the visitor can return undefined, the node it visits in the array will be reused.
|
|
5428
|
+
* - If the output node array is not undefined, then its contents will satisfy the test.
|
|
5429
|
+
* - In order to obtain a return type that is more specific than `NodeArray<Node>`, a test
|
|
5430
|
+
* function _must_ be provided, and that function must be a type predicate.
|
|
5431
|
+
*
|
|
5384
5432
|
* @param nodes The NodeArray to visit.
|
|
5385
5433
|
* @param visitor The callback used to visit a Node.
|
|
5386
5434
|
* @param test A node test to execute for each node.
|
|
5387
5435
|
* @param start An optional value indicating the starting offset at which to start visiting.
|
|
5388
5436
|
* @param count An optional value indicating the maximum number of nodes to visit.
|
|
5389
5437
|
*/
|
|
5390
|
-
function visitNodes<
|
|
5438
|
+
function visitNodes<TIn extends Node, TInArray extends NodeArray<TIn> | undefined>(nodes: TInArray, visitor: Visitor<TIn, Node | undefined>, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<Node> | (TInArray & undefined);
|
|
5391
5439
|
/**
|
|
5392
5440
|
* Starts a new lexical environment and visits a statement list, ending the lexical environment
|
|
5393
5441
|
* and merging hoisted declarations upon completion.
|