@typescript-deploys/pr-build 5.0.0-pr-49929-73 → 5.0.0-pr-52280-2
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 +592 -595
- package/lib/tsserver.js +641 -647
- package/lib/tsserverlibrary.d.ts +41 -86
- package/lib/tsserverlibrary.js +634 -643
- package/lib/typescript.d.ts +37 -76
- package/lib/typescript.js +627 -638
- package/lib/typingsInstaller.js +263 -240
- package/package.json +1 -1
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -3729,7 +3729,7 @@ declare namespace ts {
|
|
|
3729
3729
|
private enableRequestedPluginsForProjectAsync;
|
|
3730
3730
|
configurePlugin(args: protocol.ConfigurePluginRequestArguments): void;
|
|
3731
3731
|
}
|
|
3732
|
-
function formatMessage<T extends protocol.Message>(msg: T, logger: Logger, byteLength: (s: string, encoding:
|
|
3732
|
+
function formatMessage<T extends protocol.Message>(msg: T, logger: Logger, byteLength: (s: string, encoding: string) => number, newLine: string): string;
|
|
3733
3733
|
interface ServerCancellationToken extends HostCancellationToken {
|
|
3734
3734
|
setRequest(requestId: number): void;
|
|
3735
3735
|
resetRequest(requestId: number): void;
|
|
@@ -3751,14 +3751,8 @@ declare namespace ts {
|
|
|
3751
3751
|
useSingleInferredProject: boolean;
|
|
3752
3752
|
useInferredProjectPerProjectRoot: boolean;
|
|
3753
3753
|
typingsInstaller: ITypingsInstaller;
|
|
3754
|
-
byteLength: (buf: string, encoding?:
|
|
3755
|
-
hrtime: (start?: [
|
|
3756
|
-
number,
|
|
3757
|
-
number
|
|
3758
|
-
]) => [
|
|
3759
|
-
number,
|
|
3760
|
-
number
|
|
3761
|
-
];
|
|
3754
|
+
byteLength: (buf: string, encoding?: string) => number;
|
|
3755
|
+
hrtime: (start?: number[]) => number[];
|
|
3762
3756
|
logger: Logger;
|
|
3763
3757
|
/**
|
|
3764
3758
|
* If falsy, all events are suppressed.
|
|
@@ -3787,7 +3781,7 @@ declare namespace ts {
|
|
|
3787
3781
|
protected host: ServerHost;
|
|
3788
3782
|
private readonly cancellationToken;
|
|
3789
3783
|
protected readonly typingsInstaller: ITypingsInstaller;
|
|
3790
|
-
protected byteLength: (buf: string, encoding?:
|
|
3784
|
+
protected byteLength: (buf: string, encoding?: string) => number;
|
|
3791
3785
|
private hrtime;
|
|
3792
3786
|
protected logger: Logger;
|
|
3793
3787
|
protected canUseEvents: boolean;
|
|
@@ -4341,14 +4335,15 @@ declare namespace ts {
|
|
|
4341
4335
|
JSDocSeeTag = 350,
|
|
4342
4336
|
JSDocPropertyTag = 351,
|
|
4343
4337
|
JSDocThrowsTag = 352,
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4338
|
+
JSDocSatisfiesTag = 353,
|
|
4339
|
+
SyntaxList = 354,
|
|
4340
|
+
NotEmittedStatement = 355,
|
|
4341
|
+
PartiallyEmittedExpression = 356,
|
|
4342
|
+
CommaListExpression = 357,
|
|
4343
|
+
MergeDeclarationMarker = 358,
|
|
4344
|
+
EndOfDeclarationMarker = 359,
|
|
4345
|
+
SyntheticReferenceExpression = 360,
|
|
4346
|
+
Count = 361,
|
|
4352
4347
|
FirstAssignment = 63,
|
|
4353
4348
|
LastAssignment = 78,
|
|
4354
4349
|
FirstCompoundAssignment = 64,
|
|
@@ -4377,9 +4372,9 @@ declare namespace ts {
|
|
|
4377
4372
|
LastStatement = 256,
|
|
4378
4373
|
FirstNode = 163,
|
|
4379
4374
|
FirstJSDocNode = 312,
|
|
4380
|
-
LastJSDocNode =
|
|
4375
|
+
LastJSDocNode = 353,
|
|
4381
4376
|
FirstJSDocTagNode = 330,
|
|
4382
|
-
LastJSDocTagNode =
|
|
4377
|
+
LastJSDocTagNode = 353
|
|
4383
4378
|
}
|
|
4384
4379
|
type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
|
|
4385
4380
|
type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
|
|
@@ -5977,6 +5972,10 @@ declare namespace ts {
|
|
|
5977
5972
|
/** If true, then this type literal represents an *array* of its type. */
|
|
5978
5973
|
readonly isArrayType: boolean;
|
|
5979
5974
|
}
|
|
5975
|
+
interface JSDocSatisfiesTag extends JSDocTag {
|
|
5976
|
+
readonly kind: SyntaxKind.JSDocSatisfiesTag;
|
|
5977
|
+
readonly typeExpression: JSDocTypeExpression;
|
|
5978
|
+
}
|
|
5980
5979
|
enum FlowFlags {
|
|
5981
5980
|
Unreachable = 1,
|
|
5982
5981
|
Start = 2,
|
|
@@ -7823,12 +7822,14 @@ declare namespace ts {
|
|
|
7823
7822
|
updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocReadonlyTag;
|
|
7824
7823
|
createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocUnknownTag;
|
|
7825
7824
|
updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray<JSDocComment> | undefined): JSDocUnknownTag;
|
|
7826
|
-
createJSDocDeprecatedTag(tagName: Identifier
|
|
7827
|
-
updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier
|
|
7828
|
-
createJSDocOverrideTag(tagName: Identifier
|
|
7829
|
-
updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier
|
|
7825
|
+
createJSDocDeprecatedTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
|
|
7826
|
+
updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocDeprecatedTag;
|
|
7827
|
+
createJSDocOverrideTag(tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
|
|
7828
|
+
updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier, comment?: string | NodeArray<JSDocComment>): JSDocOverrideTag;
|
|
7830
7829
|
createJSDocThrowsTag(tagName: Identifier, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment>): JSDocThrowsTag;
|
|
7831
7830
|
updateJSDocThrowsTag(node: JSDocThrowsTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray<JSDocComment> | undefined): JSDocThrowsTag;
|
|
7831
|
+
createJSDocSatisfiesTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray<JSDocComment>): JSDocSatisfiesTag;
|
|
7832
|
+
updateJSDocSatisfiesTag(node: JSDocSatisfiesTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocSatisfiesTag;
|
|
7832
7833
|
createJSDocText(text: string): JSDocText;
|
|
7833
7834
|
updateJSDocText(node: JSDocText, text: string): JSDocText;
|
|
7834
7835
|
createJSDocComment(comment?: string | NodeArray<JSDocComment> | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc;
|
|
@@ -8191,39 +8192,16 @@ declare namespace ts {
|
|
|
8191
8192
|
/**
|
|
8192
8193
|
* A function that accepts and possibly transforms a node.
|
|
8193
8194
|
*/
|
|
8194
|
-
type Visitor
|
|
8195
|
-
/**
|
|
8196
|
-
* A function that walks a node using the given visitor, lifting node arrays into single nodes,
|
|
8197
|
-
* returning an node which satisfies the test.
|
|
8198
|
-
*
|
|
8199
|
-
* - If the input node is undefined, then the output is undefined.
|
|
8200
|
-
* - If the visitor returns undefined, then the output is undefined.
|
|
8201
|
-
* - If the output node is not undefined, then it will satisfy the test function.
|
|
8202
|
-
* - In order to obtain a return type that is more specific than `Node`, a test
|
|
8203
|
-
* function _must_ be provided, and that function must be a type predicate.
|
|
8204
|
-
*
|
|
8205
|
-
* For the canonical implementation of this type, @see {visitNode}.
|
|
8206
|
-
*/
|
|
8195
|
+
type Visitor = (node: Node) => VisitResult<Node>;
|
|
8207
8196
|
interface NodeVisitor {
|
|
8208
|
-
<
|
|
8209
|
-
<
|
|
8197
|
+
<T extends Node>(nodes: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T;
|
|
8198
|
+
<T extends Node>(nodes: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined;
|
|
8210
8199
|
}
|
|
8211
|
-
/**
|
|
8212
|
-
* A function that walks a node array using the given visitor, returning an array whose contents satisfy the test.
|
|
8213
|
-
*
|
|
8214
|
-
* - If the input node array is undefined, the output is undefined.
|
|
8215
|
-
* - If the visitor can return undefined, the node it visits in the array will be reused.
|
|
8216
|
-
* - If the output node array is not undefined, then its contents will satisfy the test.
|
|
8217
|
-
* - In order to obtain a return type that is more specific than `NodeArray<Node>`, a test
|
|
8218
|
-
* function _must_ be provided, and that function must be a type predicate.
|
|
8219
|
-
*
|
|
8220
|
-
* For the canonical implementation of this type, @see {visitNodes}.
|
|
8221
|
-
*/
|
|
8222
8200
|
interface NodesVisitor {
|
|
8223
|
-
<
|
|
8224
|
-
<
|
|
8201
|
+
<T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
|
|
8202
|
+
<T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined;
|
|
8225
8203
|
}
|
|
8226
|
-
type VisitResult<T extends Node
|
|
8204
|
+
type VisitResult<T extends Node> = T | readonly T[] | undefined;
|
|
8227
8205
|
interface Printer {
|
|
8228
8206
|
/**
|
|
8229
8207
|
* Print a node and its subtree as-is, without any emit transformations.
|
|
@@ -8437,7 +8415,6 @@ declare namespace ts {
|
|
|
8437
8415
|
}
|
|
8438
8416
|
type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind, modifiedTime?: Date) => void;
|
|
8439
8417
|
type DirectoryWatcherCallback = (fileName: string) => void;
|
|
8440
|
-
type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex";
|
|
8441
8418
|
interface System {
|
|
8442
8419
|
args: string[];
|
|
8443
8420
|
newLine: string;
|
|
@@ -8496,8 +8473,8 @@ declare namespace ts {
|
|
|
8496
8473
|
function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
|
|
8497
8474
|
function forEachTrailingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;
|
|
8498
8475
|
function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
|
|
8499
|
-
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;
|
|
8500
|
-
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;
|
|
8476
|
+
function reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U | undefined;
|
|
8477
|
+
function reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U | undefined;
|
|
8501
8478
|
function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
|
|
8502
8479
|
function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
|
|
8503
8480
|
/** Optionally, get the shebang */
|
|
@@ -8576,7 +8553,7 @@ declare namespace ts {
|
|
|
8576
8553
|
function getTypeParameterOwner(d: Declaration): Declaration | undefined;
|
|
8577
8554
|
function isParameterPropertyDeclaration(node: Node, parent: Node): node is ParameterPropertyDeclaration;
|
|
8578
8555
|
function isEmptyBindingPattern(node: BindingName): node is BindingPattern;
|
|
8579
|
-
function isEmptyBindingElement(node: BindingElement
|
|
8556
|
+
function isEmptyBindingElement(node: BindingElement): boolean;
|
|
8580
8557
|
function walkUpBindingElementsAndPatterns(binding: BindingElement): VariableDeclaration | ParameterDeclaration;
|
|
8581
8558
|
function getCombinedModifierFlags(node: Declaration): ModifierFlags;
|
|
8582
8559
|
function getCombinedNodeFlags(node: Node): NodeFlags;
|
|
@@ -8593,7 +8570,7 @@ declare namespace ts {
|
|
|
8593
8570
|
function getOriginalNode(node: Node): Node;
|
|
8594
8571
|
function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
|
|
8595
8572
|
function getOriginalNode(node: Node | undefined): Node | undefined;
|
|
8596
|
-
function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node) => node is T): T | undefined;
|
|
8573
|
+
function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined;
|
|
8597
8574
|
/**
|
|
8598
8575
|
* Iterates through the parent chain of a node and performs the callback on each parent until the callback
|
|
8599
8576
|
* returns a truthy value, then returns that value.
|
|
@@ -8699,6 +8676,7 @@ declare namespace ts {
|
|
|
8699
8676
|
function getJSDocReturnTag(node: Node): JSDocReturnTag | undefined;
|
|
8700
8677
|
/** Gets the JSDoc template tag for the node if present */
|
|
8701
8678
|
function getJSDocTemplateTag(node: Node): JSDocTemplateTag | undefined;
|
|
8679
|
+
function getJSDocSatisfiesTag(node: Node): JSDocSatisfiesTag | undefined;
|
|
8702
8680
|
/** Gets the JSDoc type tag for the node if present and valid */
|
|
8703
8681
|
function getJSDocTypeTag(node: Node): JSDocTypeTag | undefined;
|
|
8704
8682
|
/**
|
|
@@ -9101,6 +9079,7 @@ declare namespace ts {
|
|
|
9101
9079
|
function isJSDocUnknownTag(node: Node): node is JSDocUnknownTag;
|
|
9102
9080
|
function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
|
|
9103
9081
|
function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag;
|
|
9082
|
+
function isJSDocSatisfiesTag(node: Node): node is JSDocSatisfiesTag;
|
|
9104
9083
|
function isJSDocThrowsTag(node: Node): node is JSDocThrowsTag;
|
|
9105
9084
|
function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
|
|
9106
9085
|
function canHaveModifiers(node: Node): node is HasModifiers;
|
|
@@ -9309,65 +9288,41 @@ declare namespace ts {
|
|
|
9309
9288
|
/**
|
|
9310
9289
|
* Visits a Node using the supplied visitor, possibly returning a new Node in its place.
|
|
9311
9290
|
*
|
|
9312
|
-
* - If the input node is undefined, then the output is undefined.
|
|
9313
|
-
* - If the visitor returns undefined, then the output is undefined.
|
|
9314
|
-
* - If the output node is not undefined, then it will satisfy the test function.
|
|
9315
|
-
* - In order to obtain a return type that is more specific than `Node`, a test
|
|
9316
|
-
* function _must_ be provided, and that function must be a type predicate.
|
|
9317
|
-
*
|
|
9318
9291
|
* @param node The Node to visit.
|
|
9319
9292
|
* @param visitor The callback used to visit the Node.
|
|
9320
9293
|
* @param test A callback to execute to verify the Node is valid.
|
|
9321
9294
|
* @param lift An optional callback to execute to lift a NodeArray into a valid Node.
|
|
9322
9295
|
*/
|
|
9323
|
-
function visitNode<
|
|
9296
|
+
function visitNode<T extends Node>(node: T, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T;
|
|
9324
9297
|
/**
|
|
9325
9298
|
* Visits a Node using the supplied visitor, possibly returning a new Node in its place.
|
|
9326
9299
|
*
|
|
9327
|
-
* - If the input node is undefined, then the output is undefined.
|
|
9328
|
-
* - If the visitor returns undefined, then the output is undefined.
|
|
9329
|
-
* - If the output node is not undefined, then it will satisfy the test function.
|
|
9330
|
-
* - In order to obtain a return type that is more specific than `Node`, a test
|
|
9331
|
-
* function _must_ be provided, and that function must be a type predicate.
|
|
9332
|
-
*
|
|
9333
9300
|
* @param node The Node to visit.
|
|
9334
9301
|
* @param visitor The callback used to visit the Node.
|
|
9335
9302
|
* @param test A callback to execute to verify the Node is valid.
|
|
9336
9303
|
* @param lift An optional callback to execute to lift a NodeArray into a valid Node.
|
|
9337
9304
|
*/
|
|
9338
|
-
function visitNode<
|
|
9305
|
+
function visitNode<T extends Node>(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => T): T | undefined;
|
|
9339
9306
|
/**
|
|
9340
9307
|
* Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
|
|
9341
9308
|
*
|
|
9342
|
-
* - If the input node array is undefined, the output is undefined.
|
|
9343
|
-
* - If the visitor can return undefined, the node it visits in the array will be reused.
|
|
9344
|
-
* - If the output node array is not undefined, then its contents will satisfy the test.
|
|
9345
|
-
* - In order to obtain a return type that is more specific than `NodeArray<Node>`, a test
|
|
9346
|
-
* function _must_ be provided, and that function must be a type predicate.
|
|
9347
|
-
*
|
|
9348
9309
|
* @param nodes The NodeArray to visit.
|
|
9349
9310
|
* @param visitor The callback used to visit a Node.
|
|
9350
9311
|
* @param test A node test to execute for each node.
|
|
9351
9312
|
* @param start An optional value indicating the starting offset at which to start visiting.
|
|
9352
9313
|
* @param count An optional value indicating the maximum number of nodes to visit.
|
|
9353
9314
|
*/
|
|
9354
|
-
function visitNodes<
|
|
9315
|
+
function visitNodes<T extends Node>(nodes: NodeArray<T>, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
|
|
9355
9316
|
/**
|
|
9356
9317
|
* Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
|
|
9357
9318
|
*
|
|
9358
|
-
* - If the input node array is undefined, the output is undefined.
|
|
9359
|
-
* - If the visitor can return undefined, the node it visits in the array will be reused.
|
|
9360
|
-
* - If the output node array is not undefined, then its contents will satisfy the test.
|
|
9361
|
-
* - In order to obtain a return type that is more specific than `NodeArray<Node>`, a test
|
|
9362
|
-
* function _must_ be provided, and that function must be a type predicate.
|
|
9363
|
-
*
|
|
9364
9319
|
* @param nodes The NodeArray to visit.
|
|
9365
9320
|
* @param visitor The callback used to visit a Node.
|
|
9366
9321
|
* @param test A node test to execute for each node.
|
|
9367
9322
|
* @param start An optional value indicating the starting offset at which to start visiting.
|
|
9368
9323
|
* @param count An optional value indicating the maximum number of nodes to visit.
|
|
9369
9324
|
*/
|
|
9370
|
-
function visitNodes<
|
|
9325
|
+
function visitNodes<T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined;
|
|
9371
9326
|
/**
|
|
9372
9327
|
* Starts a new lexical environment and visits a statement list, ending the lexical environment
|
|
9373
9328
|
* and merging hoisted declarations upon completion.
|