@typescript-deploys/pr-build 5.0.0-pr-52372-4 → 5.0.0-pr-52382-14
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 +10 -16
- package/lib/tsserver.js +38 -37
- package/lib/tsserverlibrary.d.ts +1 -1
- package/lib/tsserverlibrary.js +35 -38
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +30 -37
- package/lib/typingsInstaller.js +5656 -18
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -23,7 +23,7 @@ var __export = (target, all) => {
|
|
|
23
23
|
|
|
24
24
|
// src/compiler/corePublic.ts
|
|
25
25
|
var versionMajorMinor = "5.0";
|
|
26
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
26
|
+
var version = `${versionMajorMinor}.0-insiders.20230125`;
|
|
27
27
|
|
|
28
28
|
// src/compiler/core.ts
|
|
29
29
|
var emptyArray = [];
|
|
@@ -27432,12 +27432,7 @@ var Parser;
|
|
|
27432
27432
|
const name = parseIdentifier();
|
|
27433
27433
|
let constraint;
|
|
27434
27434
|
let expression;
|
|
27435
|
-
if (parseOptional(94 /* ExtendsKeyword */)
|
|
27436
|
-
if (token() === 58 /* ColonToken */) {
|
|
27437
|
-
parseErrorAtCurrentToken(Diagnostics.Invalid_character);
|
|
27438
|
-
nextToken();
|
|
27439
|
-
constraint = parseType();
|
|
27440
|
-
}
|
|
27435
|
+
if (parseOptional(94 /* ExtendsKeyword */)) {
|
|
27441
27436
|
if (isStartOfType() || !isStartOfExpression()) {
|
|
27442
27437
|
constraint = parseType();
|
|
27443
27438
|
} else {
|
|
@@ -27724,10 +27719,6 @@ var Parser;
|
|
|
27724
27719
|
function parseObjectTypeMembers() {
|
|
27725
27720
|
let members;
|
|
27726
27721
|
if (parseExpected(18 /* OpenBraceToken */)) {
|
|
27727
|
-
if (token() === 51 /* BarToken */) {
|
|
27728
|
-
parseErrorAtCurrentToken(Diagnostics.Invalid_character);
|
|
27729
|
-
nextToken();
|
|
27730
|
-
}
|
|
27731
27722
|
members = parseList(ParsingContext.TypeMembers, parseTypeMember);
|
|
27732
27723
|
parseExpected(19 /* CloseBraceToken */);
|
|
27733
27724
|
} else {
|
|
@@ -46317,7 +46308,7 @@ function createTypeChecker(host) {
|
|
|
46317
46308
|
return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker);
|
|
46318
46309
|
function symbolToStringWorker(writer2) {
|
|
46319
46310
|
const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags);
|
|
46320
|
-
const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ?
|
|
46311
|
+
const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments();
|
|
46321
46312
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
46322
46313
|
printer.writeNode(
|
|
46323
46314
|
4 /* Unspecified */,
|
|
@@ -46339,7 +46330,7 @@ function createTypeChecker(host) {
|
|
|
46339
46330
|
sigOutput = kind === 1 /* Construct */ ? 177 /* ConstructSignature */ : 176 /* CallSignature */;
|
|
46340
46331
|
}
|
|
46341
46332
|
const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */);
|
|
46342
|
-
const printer =
|
|
46333
|
+
const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
|
|
46343
46334
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
46344
46335
|
printer.writeNode(
|
|
46345
46336
|
4 /* Unspecified */,
|
|
@@ -46356,8 +46347,7 @@ function createTypeChecker(host) {
|
|
|
46356
46347
|
const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | (noTruncation ? 1 /* NoTruncation */ : 0));
|
|
46357
46348
|
if (typeNode === void 0)
|
|
46358
46349
|
return Debug.fail("should always get typenode");
|
|
46359
|
-
const
|
|
46360
|
-
const printer = createPrinter(options);
|
|
46350
|
+
const printer = type !== unresolvedType ? createPrinterWithRemoveComments() : createPrinterWithDefaults();
|
|
46361
46351
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
46362
46352
|
printer.writeNode(
|
|
46363
46353
|
4 /* Unspecified */,
|
|
@@ -49708,7 +49698,7 @@ function createTypeChecker(host) {
|
|
|
49708
49698
|
typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */)
|
|
49709
49699
|
// TODO: GH#18217
|
|
49710
49700
|
);
|
|
49711
|
-
const printer =
|
|
49701
|
+
const printer = createPrinterWithRemoveComments();
|
|
49712
49702
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
49713
49703
|
printer.writeNode(
|
|
49714
49704
|
4 /* Unspecified */,
|
|
@@ -106283,6 +106273,10 @@ function emitUsingBuildInfoWorker(config, host, getCommandLine, customTransforme
|
|
|
106283
106273
|
);
|
|
106284
106274
|
return outputFiles;
|
|
106285
106275
|
}
|
|
106276
|
+
var createPrinterWithDefaults = memoize(() => createPrinter({}));
|
|
106277
|
+
var createPrinterWithRemoveComments = memoize(() => createPrinter({ removeComments: true }));
|
|
106278
|
+
var createPrinterWithRemoveCommentsNeverAsciiEscape = memoize(() => createPrinter({ removeComments: true, neverAsciiEscape: true }));
|
|
106279
|
+
var createPrinterWithRemoveCommentsOmitTrailingSemicolon = memoize(() => createPrinter({ removeComments: true, omitTrailingSemicolon: true }));
|
|
106286
106280
|
function createPrinter(printerOptions = {}, handlers = {}) {
|
|
106287
106281
|
const {
|
|
106288
106282
|
hasGlobalName,
|
package/lib/tsserver.js
CHANGED
|
@@ -429,6 +429,10 @@ __export(server_exports, {
|
|
|
429
429
|
createPatternMatcher: () => createPatternMatcher,
|
|
430
430
|
createPrependNodes: () => createPrependNodes,
|
|
431
431
|
createPrinter: () => createPrinter,
|
|
432
|
+
createPrinterWithDefaults: () => createPrinterWithDefaults,
|
|
433
|
+
createPrinterWithRemoveComments: () => createPrinterWithRemoveComments,
|
|
434
|
+
createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape,
|
|
435
|
+
createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon,
|
|
432
436
|
createProgram: () => createProgram,
|
|
433
437
|
createProgramHost: () => createProgramHost,
|
|
434
438
|
createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral,
|
|
@@ -2373,7 +2377,7 @@ __export(ts_server_exports3, {
|
|
|
2373
2377
|
|
|
2374
2378
|
// src/compiler/corePublic.ts
|
|
2375
2379
|
var versionMajorMinor = "5.0";
|
|
2376
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2380
|
+
var version = `${versionMajorMinor}.0-insiders.20230125`;
|
|
2377
2381
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2378
2382
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2379
2383
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -31853,12 +31857,7 @@ var Parser;
|
|
|
31853
31857
|
const name = parseIdentifier();
|
|
31854
31858
|
let constraint;
|
|
31855
31859
|
let expression;
|
|
31856
|
-
if (parseOptional(94 /* ExtendsKeyword */)
|
|
31857
|
-
if (token() === 58 /* ColonToken */) {
|
|
31858
|
-
parseErrorAtCurrentToken(Diagnostics.Invalid_character);
|
|
31859
|
-
nextToken();
|
|
31860
|
-
constraint = parseType();
|
|
31861
|
-
}
|
|
31860
|
+
if (parseOptional(94 /* ExtendsKeyword */)) {
|
|
31862
31861
|
if (isStartOfType() || !isStartOfExpression()) {
|
|
31863
31862
|
constraint = parseType();
|
|
31864
31863
|
} else {
|
|
@@ -32145,10 +32144,6 @@ var Parser;
|
|
|
32145
32144
|
function parseObjectTypeMembers() {
|
|
32146
32145
|
let members;
|
|
32147
32146
|
if (parseExpected(18 /* OpenBraceToken */)) {
|
|
32148
|
-
if (token() === 51 /* BarToken */) {
|
|
32149
|
-
parseErrorAtCurrentToken(Diagnostics.Invalid_character);
|
|
32150
|
-
nextToken();
|
|
32151
|
-
}
|
|
32152
32147
|
members = parseList(ParsingContext.TypeMembers, parseTypeMember);
|
|
32153
32148
|
parseExpected(19 /* CloseBraceToken */);
|
|
32154
32149
|
} else {
|
|
@@ -50986,7 +50981,7 @@ function createTypeChecker(host) {
|
|
|
50986
50981
|
return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker);
|
|
50987
50982
|
function symbolToStringWorker(writer2) {
|
|
50988
50983
|
const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags);
|
|
50989
|
-
const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ?
|
|
50984
|
+
const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments();
|
|
50990
50985
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
50991
50986
|
printer.writeNode(
|
|
50992
50987
|
4 /* Unspecified */,
|
|
@@ -51008,7 +51003,7 @@ function createTypeChecker(host) {
|
|
|
51008
51003
|
sigOutput = kind === 1 /* Construct */ ? 177 /* ConstructSignature */ : 176 /* CallSignature */;
|
|
51009
51004
|
}
|
|
51010
51005
|
const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */);
|
|
51011
|
-
const printer =
|
|
51006
|
+
const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
|
|
51012
51007
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
51013
51008
|
printer.writeNode(
|
|
51014
51009
|
4 /* Unspecified */,
|
|
@@ -51025,8 +51020,7 @@ function createTypeChecker(host) {
|
|
|
51025
51020
|
const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | (noTruncation ? 1 /* NoTruncation */ : 0));
|
|
51026
51021
|
if (typeNode === void 0)
|
|
51027
51022
|
return Debug.fail("should always get typenode");
|
|
51028
|
-
const
|
|
51029
|
-
const printer = createPrinter(options);
|
|
51023
|
+
const printer = type !== unresolvedType ? createPrinterWithRemoveComments() : createPrinterWithDefaults();
|
|
51030
51024
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
51031
51025
|
printer.writeNode(
|
|
51032
51026
|
4 /* Unspecified */,
|
|
@@ -54377,7 +54371,7 @@ function createTypeChecker(host) {
|
|
|
54377
54371
|
typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */)
|
|
54378
54372
|
// TODO: GH#18217
|
|
54379
54373
|
);
|
|
54380
|
-
const printer =
|
|
54374
|
+
const printer = createPrinterWithRemoveComments();
|
|
54381
54375
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
54382
54376
|
printer.writeNode(
|
|
54383
54377
|
4 /* Unspecified */,
|
|
@@ -111134,6 +111128,10 @@ function emitUsingBuildInfoWorker(config, host, getCommandLine, customTransforme
|
|
|
111134
111128
|
);
|
|
111135
111129
|
return outputFiles;
|
|
111136
111130
|
}
|
|
111131
|
+
var createPrinterWithDefaults = memoize(() => createPrinter({}));
|
|
111132
|
+
var createPrinterWithRemoveComments = memoize(() => createPrinter({ removeComments: true }));
|
|
111133
|
+
var createPrinterWithRemoveCommentsNeverAsciiEscape = memoize(() => createPrinter({ removeComments: true, neverAsciiEscape: true }));
|
|
111134
|
+
var createPrinterWithRemoveCommentsOmitTrailingSemicolon = memoize(() => createPrinter({ removeComments: true, omitTrailingSemicolon: true }));
|
|
111137
111135
|
function createPrinter(printerOptions = {}, handlers = {}) {
|
|
111138
111136
|
const {
|
|
111139
111137
|
hasGlobalName,
|
|
@@ -126921,6 +126919,10 @@ __export(ts_exports3, {
|
|
|
126921
126919
|
createPatternMatcher: () => createPatternMatcher,
|
|
126922
126920
|
createPrependNodes: () => createPrependNodes,
|
|
126923
126921
|
createPrinter: () => createPrinter,
|
|
126922
|
+
createPrinterWithDefaults: () => createPrinterWithDefaults,
|
|
126923
|
+
createPrinterWithRemoveComments: () => createPrinterWithRemoveComments,
|
|
126924
|
+
createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape,
|
|
126925
|
+
createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon,
|
|
126924
126926
|
createProgram: () => createProgram,
|
|
126925
126927
|
createProgramHost: () => createProgramHost,
|
|
126926
126928
|
createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral,
|
|
@@ -131013,7 +131015,7 @@ function signatureToDisplayParts(typechecker, signature, enclosingDeclaration, f
|
|
|
131013
131015
|
function nodeToDisplayParts(node, enclosingDeclaration) {
|
|
131014
131016
|
const file = enclosingDeclaration.getSourceFile();
|
|
131015
131017
|
return mapToDisplayParts((writer) => {
|
|
131016
|
-
const printer =
|
|
131018
|
+
const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
|
|
131017
131019
|
printer.writeNode(4 /* Unspecified */, node, file, writer);
|
|
131018
131020
|
});
|
|
131019
131021
|
}
|
|
@@ -137398,12 +137400,9 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
|
137398
137400
|
Debug.assertEqual(action.type, "install package");
|
|
137399
137401
|
return host.installPackage ? host.installPackage({ fileName: getPath(action.file), packageName: action.packageName }) : Promise.reject("Host does not implement `installPackage`");
|
|
137400
137402
|
}
|
|
137401
|
-
function getDocCommentTemplateAtPosition2(fileName, position, options) {
|
|
137402
|
-
|
|
137403
|
-
|
|
137404
|
-
/*formatSettings*/
|
|
137405
|
-
void 0
|
|
137406
|
-
), syntaxTreeCache.getCurrentSourceFile(fileName), position, options);
|
|
137403
|
+
function getDocCommentTemplateAtPosition2(fileName, position, options, formatOptions) {
|
|
137404
|
+
const formatSettings = formatOptions ? ts_formatting_exports.getFormatContext(formatOptions, host).options : void 0;
|
|
137405
|
+
return ts_JsDoc_exports.getDocCommentTemplateAtPosition(getNewLineOrDefaultFromHost(host, formatSettings), syntaxTreeCache.getCurrentSourceFile(fileName), position, options);
|
|
137407
137406
|
}
|
|
137408
137407
|
function isValidBraceCompletionAtPosition(fileName, position, openingBrace) {
|
|
137409
137408
|
if (openingBrace === 60 /* lessThan */) {
|
|
@@ -138584,10 +138583,10 @@ var LanguageServiceShimObject = class extends ShimBase {
|
|
|
138584
138583
|
}
|
|
138585
138584
|
);
|
|
138586
138585
|
}
|
|
138587
|
-
getDocCommentTemplateAtPosition(fileName, position, options) {
|
|
138586
|
+
getDocCommentTemplateAtPosition(fileName, position, options, formatOptions) {
|
|
138588
138587
|
return this.forwardJSONCall(
|
|
138589
138588
|
`getDocCommentTemplateAtPosition('${fileName}', ${position})`,
|
|
138590
|
-
() => this.languageService.getDocCommentTemplateAtPosition(fileName, position, options)
|
|
138589
|
+
() => this.languageService.getDocCommentTemplateAtPosition(fileName, position, options, formatOptions)
|
|
138591
138590
|
);
|
|
138592
138591
|
}
|
|
138593
138592
|
/// NAVIGATE TO
|
|
@@ -139479,7 +139478,7 @@ function getCallHierarchyItemName(program, node) {
|
|
|
139479
139478
|
}
|
|
139480
139479
|
}
|
|
139481
139480
|
if (text === void 0) {
|
|
139482
|
-
const printer =
|
|
139481
|
+
const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
|
|
139483
139482
|
text = usingSingleLineStringWriter((writer) => printer.writeNode(4 /* Unspecified */, node, node.getSourceFile(), writer));
|
|
139484
139483
|
}
|
|
139485
139484
|
return { text, pos: declName.getStart(), end: declName.getEnd() };
|
|
@@ -157249,8 +157248,7 @@ function provideInlayHints(context) {
|
|
|
157249
157248
|
}
|
|
157250
157249
|
function printTypeInSingleLine(type) {
|
|
157251
157250
|
const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */;
|
|
157252
|
-
const
|
|
157253
|
-
const printer = createPrinter(options);
|
|
157251
|
+
const printer = createPrinterWithRemoveComments();
|
|
157254
157252
|
return usingSingleLineStringWriter((writer) => {
|
|
157255
157253
|
const typeNode = checker.typeToTypeNode(
|
|
157256
157254
|
type,
|
|
@@ -157340,6 +157338,8 @@ var jsDocTagNames = [
|
|
|
157340
157338
|
"lends",
|
|
157341
157339
|
"license",
|
|
157342
157340
|
"link",
|
|
157341
|
+
"linkcode",
|
|
157342
|
+
"linkplain",
|
|
157343
157343
|
"listens",
|
|
157344
157344
|
"member",
|
|
157345
157345
|
"memberof",
|
|
@@ -157352,6 +157352,7 @@ var jsDocTagNames = [
|
|
|
157352
157352
|
"package",
|
|
157353
157353
|
"param",
|
|
157354
157354
|
"private",
|
|
157355
|
+
"prop",
|
|
157355
157356
|
"property",
|
|
157356
157357
|
"protected",
|
|
157357
157358
|
"public",
|
|
@@ -164178,7 +164179,7 @@ function createTypeHelpItems(symbol, { argumentCount, argumentsSpan: applicableS
|
|
|
164178
164179
|
}
|
|
164179
164180
|
function getTypeHelpItem(symbol, typeParameters, checker, enclosingDeclaration, sourceFile) {
|
|
164180
164181
|
const typeSymbolDisplay = symbolToDisplayParts(checker, symbol);
|
|
164181
|
-
const printer =
|
|
164182
|
+
const printer = createPrinterWithRemoveComments();
|
|
164182
164183
|
const parameters = typeParameters.map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer));
|
|
164183
164184
|
const documentation = symbol.getDocumentationComment(checker);
|
|
164184
164185
|
const tags = symbol.getJsDocTags(checker);
|
|
@@ -164222,7 +164223,7 @@ function returnTypeToDisplayParts(candidateSignature, enclosingDeclaration, chec
|
|
|
164222
164223
|
}
|
|
164223
164224
|
function itemInfoForTypeParameters(candidateSignature, checker, enclosingDeclaration, sourceFile) {
|
|
164224
164225
|
const typeParameters = (candidateSignature.target || candidateSignature).typeParameters;
|
|
164225
|
-
const printer =
|
|
164226
|
+
const printer = createPrinterWithRemoveComments();
|
|
164226
164227
|
const parameters = (typeParameters || emptyArray).map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer));
|
|
164227
164228
|
const thisParameter = candidateSignature.thisParameter ? [checker.symbolToParameterDeclaration(candidateSignature.thisParameter, enclosingDeclaration, signatureHelpNodeBuilderFlags)] : [];
|
|
164228
164229
|
return checker.getExpandedParameters(candidateSignature).map((paramList) => {
|
|
@@ -164234,7 +164235,7 @@ function itemInfoForTypeParameters(candidateSignature, checker, enclosingDeclara
|
|
|
164234
164235
|
});
|
|
164235
164236
|
}
|
|
164236
164237
|
function itemInfoForParameters(candidateSignature, checker, enclosingDeclaration, sourceFile) {
|
|
164237
|
-
const printer =
|
|
164238
|
+
const printer = createPrinterWithRemoveComments();
|
|
164238
164239
|
const typeParameterParts = mapToDisplayParts((writer) => {
|
|
164239
164240
|
if (candidateSignature.typeParameters && candidateSignature.typeParameters.length) {
|
|
164240
164241
|
const args = factory.createNodeArray(candidateSignature.typeParameters.map((p) => checker.typeParameterToDeclaration(p, enclosingDeclaration, signatureHelpNodeBuilderFlags)));
|
|
@@ -164609,7 +164610,6 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so
|
|
|
164609
164610
|
let hasAddedSymbolInfo = false;
|
|
164610
164611
|
const isThisExpression = location.kind === 108 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location);
|
|
164611
164612
|
let type;
|
|
164612
|
-
let printer;
|
|
164613
164613
|
let documentationFromAlias;
|
|
164614
164614
|
let tagsFromAlias;
|
|
164615
164615
|
let hasMultipleSignatures = false;
|
|
@@ -165002,10 +165002,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so
|
|
|
165002
165002
|
}
|
|
165003
165003
|
return { displayParts, documentation, symbolKind, tags: tags.length === 0 ? void 0 : tags };
|
|
165004
165004
|
function getPrinter() {
|
|
165005
|
-
|
|
165006
|
-
printer = createPrinter({ removeComments: true });
|
|
165007
|
-
}
|
|
165008
|
-
return printer;
|
|
165005
|
+
return createPrinterWithRemoveComments();
|
|
165009
165006
|
}
|
|
165010
165007
|
function prefixNextMeaning() {
|
|
165011
165008
|
if (displayParts.length) {
|
|
@@ -178162,7 +178159,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
178162
178159
|
getDocCommentTemplate(args) {
|
|
178163
178160
|
const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);
|
|
178164
178161
|
const position = this.getPositionInFile(args, file);
|
|
178165
|
-
return languageService.getDocCommentTemplateAtPosition(file, position, this.getPreferences(file));
|
|
178162
|
+
return languageService.getDocCommentTemplateAtPosition(file, position, this.getPreferences(file), this.getFormatOptions(file));
|
|
178166
178163
|
}
|
|
178167
178164
|
getSpanOfEnclosingComment(args) {
|
|
178168
178165
|
const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);
|
|
@@ -181085,6 +181082,10 @@ start(initializeNodeSystem(), require("os").platform());
|
|
|
181085
181082
|
createPatternMatcher,
|
|
181086
181083
|
createPrependNodes,
|
|
181087
181084
|
createPrinter,
|
|
181085
|
+
createPrinterWithDefaults,
|
|
181086
|
+
createPrinterWithRemoveComments,
|
|
181087
|
+
createPrinterWithRemoveCommentsNeverAsciiEscape,
|
|
181088
|
+
createPrinterWithRemoveCommentsOmitTrailingSemicolon,
|
|
181088
181089
|
createProgram,
|
|
181089
181090
|
createProgramHost,
|
|
181090
181091
|
createPropertyNameNodeForIdentifierOrLiteral,
|
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -9990,7 +9990,7 @@ declare namespace ts {
|
|
|
9990
9990
|
getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
|
|
9991
9991
|
getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
|
|
9992
9992
|
getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
|
|
9993
|
-
getDocCommentTemplateAtPosition(fileName: string, position: number, options?: DocCommentTemplateOptions): TextInsertion | undefined;
|
|
9993
|
+
getDocCommentTemplateAtPosition(fileName: string, position: number, options?: DocCommentTemplateOptions, formatOptions?: FormatCodeSettings): TextInsertion | undefined;
|
|
9994
9994
|
isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
|
|
9995
9995
|
/**
|
|
9996
9996
|
* This will return a defined result if the position is after the `>` of the opening tag, or somewhere in the text, of a JSXElement with no closing tag.
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -42,7 +42,7 @@ var ts = (() => {
|
|
|
42
42
|
"src/compiler/corePublic.ts"() {
|
|
43
43
|
"use strict";
|
|
44
44
|
versionMajorMinor = "5.0";
|
|
45
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
45
|
+
version = `${versionMajorMinor}.0-insiders.20230125`;
|
|
46
46
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
47
47
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
48
48
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -29885,12 +29885,7 @@ ${lanes.join("\n")}
|
|
|
29885
29885
|
const name = parseIdentifier();
|
|
29886
29886
|
let constraint;
|
|
29887
29887
|
let expression;
|
|
29888
|
-
if (parseOptional(94 /* ExtendsKeyword */)
|
|
29889
|
-
if (token() === 58 /* ColonToken */) {
|
|
29890
|
-
parseErrorAtCurrentToken(Diagnostics.Invalid_character);
|
|
29891
|
-
nextToken();
|
|
29892
|
-
constraint = parseType();
|
|
29893
|
-
}
|
|
29888
|
+
if (parseOptional(94 /* ExtendsKeyword */)) {
|
|
29894
29889
|
if (isStartOfType() || !isStartOfExpression()) {
|
|
29895
29890
|
constraint = parseType();
|
|
29896
29891
|
} else {
|
|
@@ -30177,10 +30172,6 @@ ${lanes.join("\n")}
|
|
|
30177
30172
|
function parseObjectTypeMembers() {
|
|
30178
30173
|
let members;
|
|
30179
30174
|
if (parseExpected(18 /* OpenBraceToken */)) {
|
|
30180
|
-
if (token() === 51 /* BarToken */) {
|
|
30181
|
-
parseErrorAtCurrentToken(Diagnostics.Invalid_character);
|
|
30182
|
-
nextToken();
|
|
30183
|
-
}
|
|
30184
30175
|
members = parseList(ParsingContext.TypeMembers, parseTypeMember);
|
|
30185
30176
|
parseExpected(19 /* CloseBraceToken */);
|
|
30186
30177
|
} else {
|
|
@@ -48717,7 +48708,7 @@ ${lanes.join("\n")}
|
|
|
48717
48708
|
return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker);
|
|
48718
48709
|
function symbolToStringWorker(writer2) {
|
|
48719
48710
|
const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags);
|
|
48720
|
-
const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ?
|
|
48711
|
+
const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 308 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments();
|
|
48721
48712
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
48722
48713
|
printer.writeNode(
|
|
48723
48714
|
4 /* Unspecified */,
|
|
@@ -48739,7 +48730,7 @@ ${lanes.join("\n")}
|
|
|
48739
48730
|
sigOutput = kind === 1 /* Construct */ ? 177 /* ConstructSignature */ : 176 /* CallSignature */;
|
|
48740
48731
|
}
|
|
48741
48732
|
const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */);
|
|
48742
|
-
const printer =
|
|
48733
|
+
const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
|
|
48743
48734
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
48744
48735
|
printer.writeNode(
|
|
48745
48736
|
4 /* Unspecified */,
|
|
@@ -48756,8 +48747,7 @@ ${lanes.join("\n")}
|
|
|
48756
48747
|
const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | (noTruncation ? 1 /* NoTruncation */ : 0));
|
|
48757
48748
|
if (typeNode === void 0)
|
|
48758
48749
|
return Debug.fail("should always get typenode");
|
|
48759
|
-
const
|
|
48760
|
-
const printer = createPrinter(options);
|
|
48750
|
+
const printer = type !== unresolvedType ? createPrinterWithRemoveComments() : createPrinterWithDefaults();
|
|
48761
48751
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
48762
48752
|
printer.writeNode(
|
|
48763
48753
|
4 /* Unspecified */,
|
|
@@ -52108,7 +52098,7 @@ ${lanes.join("\n")}
|
|
|
52108
52098
|
typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */)
|
|
52109
52099
|
// TODO: GH#18217
|
|
52110
52100
|
);
|
|
52111
|
-
const printer =
|
|
52101
|
+
const printer = createPrinterWithRemoveComments();
|
|
52112
52102
|
const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration);
|
|
52113
52103
|
printer.writeNode(
|
|
52114
52104
|
4 /* Unspecified */,
|
|
@@ -113793,7 +113783,7 @@ ${lanes.join("\n")}
|
|
|
113793
113783
|
function getEmitListItem(emit, parenthesizerRule) {
|
|
113794
113784
|
return emit.length === 1 ? emitListItemNoParenthesizer : typeof parenthesizerRule === "object" ? emitListItemWithParenthesizerRuleSelector : emitListItemWithParenthesizerRule;
|
|
113795
113785
|
}
|
|
113796
|
-
var brackets, notImplementedResolver, TempFlags;
|
|
113786
|
+
var brackets, notImplementedResolver, createPrinterWithDefaults, createPrinterWithRemoveComments, createPrinterWithRemoveCommentsNeverAsciiEscape, createPrinterWithRemoveCommentsOmitTrailingSemicolon, TempFlags;
|
|
113797
113787
|
var init_emitter = __esm({
|
|
113798
113788
|
"src/compiler/emitter.ts"() {
|
|
113799
113789
|
"use strict";
|
|
@@ -113844,6 +113834,10 @@ ${lanes.join("\n")}
|
|
|
113844
113834
|
getDeclarationStatementsForSourceFile: notImplemented,
|
|
113845
113835
|
isImportRequiredByAugmentation: notImplemented
|
|
113846
113836
|
};
|
|
113837
|
+
createPrinterWithDefaults = memoize(() => createPrinter({}));
|
|
113838
|
+
createPrinterWithRemoveComments = memoize(() => createPrinter({ removeComments: true }));
|
|
113839
|
+
createPrinterWithRemoveCommentsNeverAsciiEscape = memoize(() => createPrinter({ removeComments: true, neverAsciiEscape: true }));
|
|
113840
|
+
createPrinterWithRemoveCommentsOmitTrailingSemicolon = memoize(() => createPrinter({ removeComments: true, omitTrailingSemicolon: true }));
|
|
113847
113841
|
TempFlags = /* @__PURE__ */ ((TempFlags2) => {
|
|
113848
113842
|
TempFlags2[TempFlags2["Auto"] = 0] = "Auto";
|
|
113849
113843
|
TempFlags2[TempFlags2["CountMask"] = 268435455] = "CountMask";
|
|
@@ -126898,7 +126892,7 @@ ${lanes.join("\n")}
|
|
|
126898
126892
|
function nodeToDisplayParts(node, enclosingDeclaration) {
|
|
126899
126893
|
const file = enclosingDeclaration.getSourceFile();
|
|
126900
126894
|
return mapToDisplayParts((writer) => {
|
|
126901
|
-
const printer =
|
|
126895
|
+
const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
|
|
126902
126896
|
printer.writeNode(4 /* Unspecified */, node, file, writer);
|
|
126903
126897
|
});
|
|
126904
126898
|
}
|
|
@@ -132752,12 +132746,9 @@ ${lanes.join("\n")}
|
|
|
132752
132746
|
Debug.assertEqual(action.type, "install package");
|
|
132753
132747
|
return host.installPackage ? host.installPackage({ fileName: getPath(action.file), packageName: action.packageName }) : Promise.reject("Host does not implement `installPackage`");
|
|
132754
132748
|
}
|
|
132755
|
-
function getDocCommentTemplateAtPosition2(fileName, position, options) {
|
|
132756
|
-
|
|
132757
|
-
|
|
132758
|
-
/*formatSettings*/
|
|
132759
|
-
void 0
|
|
132760
|
-
), syntaxTreeCache.getCurrentSourceFile(fileName), position, options);
|
|
132749
|
+
function getDocCommentTemplateAtPosition2(fileName, position, options, formatOptions) {
|
|
132750
|
+
const formatSettings = formatOptions ? ts_formatting_exports.getFormatContext(formatOptions, host).options : void 0;
|
|
132751
|
+
return ts_JsDoc_exports.getDocCommentTemplateAtPosition(getNewLineOrDefaultFromHost(host, formatSettings), syntaxTreeCache.getCurrentSourceFile(fileName), position, options);
|
|
132761
132752
|
}
|
|
132762
132753
|
function isValidBraceCompletionAtPosition(fileName, position, openingBrace) {
|
|
132763
132754
|
if (openingBrace === 60 /* lessThan */) {
|
|
@@ -134629,10 +134620,10 @@ ${lanes.join("\n")}
|
|
|
134629
134620
|
}
|
|
134630
134621
|
);
|
|
134631
134622
|
}
|
|
134632
|
-
getDocCommentTemplateAtPosition(fileName, position, options) {
|
|
134623
|
+
getDocCommentTemplateAtPosition(fileName, position, options, formatOptions) {
|
|
134633
134624
|
return this.forwardJSONCall(
|
|
134634
134625
|
`getDocCommentTemplateAtPosition('${fileName}', ${position})`,
|
|
134635
|
-
() => this.languageService.getDocCommentTemplateAtPosition(fileName, position, options)
|
|
134626
|
+
() => this.languageService.getDocCommentTemplateAtPosition(fileName, position, options, formatOptions)
|
|
134636
134627
|
);
|
|
134637
134628
|
}
|
|
134638
134629
|
/// NAVIGATE TO
|
|
@@ -135526,7 +135517,7 @@ ${lanes.join("\n")}
|
|
|
135526
135517
|
}
|
|
135527
135518
|
}
|
|
135528
135519
|
if (text === void 0) {
|
|
135529
|
-
const printer =
|
|
135520
|
+
const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon();
|
|
135530
135521
|
text = usingSingleLineStringWriter((writer) => printer.writeNode(4 /* Unspecified */, node, node.getSourceFile(), writer));
|
|
135531
135522
|
}
|
|
135532
135523
|
return { text, pos: declName.getStart(), end: declName.getEnd() };
|
|
@@ -154007,8 +153998,7 @@ ${lanes.join("\n")}
|
|
|
154007
153998
|
}
|
|
154008
153999
|
function printTypeInSingleLine(type) {
|
|
154009
154000
|
const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */;
|
|
154010
|
-
const
|
|
154011
|
-
const printer = createPrinter(options);
|
|
154001
|
+
const printer = createPrinterWithRemoveComments();
|
|
154012
154002
|
return usingSingleLineStringWriter((writer) => {
|
|
154013
154003
|
const typeNode = checker.typeToTypeNode(
|
|
154014
154004
|
type,
|
|
@@ -154424,6 +154414,8 @@ ${lanes.join("\n")}
|
|
|
154424
154414
|
"lends",
|
|
154425
154415
|
"license",
|
|
154426
154416
|
"link",
|
|
154417
|
+
"linkcode",
|
|
154418
|
+
"linkplain",
|
|
154427
154419
|
"listens",
|
|
154428
154420
|
"member",
|
|
154429
154421
|
"memberof",
|
|
@@ -154436,6 +154428,7 @@ ${lanes.join("\n")}
|
|
|
154436
154428
|
"package",
|
|
154437
154429
|
"param",
|
|
154438
154430
|
"private",
|
|
154431
|
+
"prop",
|
|
154439
154432
|
"property",
|
|
154440
154433
|
"protected",
|
|
154441
154434
|
"public",
|
|
@@ -161180,7 +161173,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
161180
161173
|
}
|
|
161181
161174
|
function getTypeHelpItem(symbol, typeParameters, checker, enclosingDeclaration, sourceFile) {
|
|
161182
161175
|
const typeSymbolDisplay = symbolToDisplayParts(checker, symbol);
|
|
161183
|
-
const printer =
|
|
161176
|
+
const printer = createPrinterWithRemoveComments();
|
|
161184
161177
|
const parameters = typeParameters.map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer));
|
|
161185
161178
|
const documentation = symbol.getDocumentationComment(checker);
|
|
161186
161179
|
const tags = symbol.getJsDocTags(checker);
|
|
@@ -161223,7 +161216,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
161223
161216
|
}
|
|
161224
161217
|
function itemInfoForTypeParameters(candidateSignature, checker, enclosingDeclaration, sourceFile) {
|
|
161225
161218
|
const typeParameters = (candidateSignature.target || candidateSignature).typeParameters;
|
|
161226
|
-
const printer =
|
|
161219
|
+
const printer = createPrinterWithRemoveComments();
|
|
161227
161220
|
const parameters = (typeParameters || emptyArray).map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer));
|
|
161228
161221
|
const thisParameter = candidateSignature.thisParameter ? [checker.symbolToParameterDeclaration(candidateSignature.thisParameter, enclosingDeclaration, signatureHelpNodeBuilderFlags)] : [];
|
|
161229
161222
|
return checker.getExpandedParameters(candidateSignature).map((paramList) => {
|
|
@@ -161235,7 +161228,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
161235
161228
|
});
|
|
161236
161229
|
}
|
|
161237
161230
|
function itemInfoForParameters(candidateSignature, checker, enclosingDeclaration, sourceFile) {
|
|
161238
|
-
const printer =
|
|
161231
|
+
const printer = createPrinterWithRemoveComments();
|
|
161239
161232
|
const typeParameterParts = mapToDisplayParts((writer) => {
|
|
161240
161233
|
if (candidateSignature.typeParameters && candidateSignature.typeParameters.length) {
|
|
161241
161234
|
const args = factory.createNodeArray(candidateSignature.typeParameters.map((p) => checker.typeParameterToDeclaration(p, enclosingDeclaration, signatureHelpNodeBuilderFlags)));
|
|
@@ -161641,7 +161634,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
161641
161634
|
let hasAddedSymbolInfo = false;
|
|
161642
161635
|
const isThisExpression = location.kind === 108 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location);
|
|
161643
161636
|
let type;
|
|
161644
|
-
let printer;
|
|
161645
161637
|
let documentationFromAlias;
|
|
161646
161638
|
let tagsFromAlias;
|
|
161647
161639
|
let hasMultipleSignatures = false;
|
|
@@ -162034,10 +162026,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
162034
162026
|
}
|
|
162035
162027
|
return { displayParts, documentation, symbolKind, tags: tags.length === 0 ? void 0 : tags };
|
|
162036
162028
|
function getPrinter() {
|
|
162037
|
-
|
|
162038
|
-
printer = createPrinter({ removeComments: true });
|
|
162039
|
-
}
|
|
162040
|
-
return printer;
|
|
162029
|
+
return createPrinterWithRemoveComments();
|
|
162041
162030
|
}
|
|
162042
162031
|
function prefixNextMeaning() {
|
|
162043
162032
|
if (displayParts.length) {
|
|
@@ -175508,7 +175497,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
175508
175497
|
getDocCommentTemplate(args) {
|
|
175509
175498
|
const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);
|
|
175510
175499
|
const position = this.getPositionInFile(args, file);
|
|
175511
|
-
return languageService.getDocCommentTemplateAtPosition(file, position, this.getPreferences(file));
|
|
175500
|
+
return languageService.getDocCommentTemplateAtPosition(file, position, this.getPreferences(file), this.getFormatOptions(file));
|
|
175512
175501
|
}
|
|
175513
175502
|
getSpanOfEnclosingComment(args) {
|
|
175514
175503
|
const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);
|
|
@@ -177744,6 +177733,10 @@ ${e.message}`;
|
|
|
177744
177733
|
createPatternMatcher: () => createPatternMatcher,
|
|
177745
177734
|
createPrependNodes: () => createPrependNodes,
|
|
177746
177735
|
createPrinter: () => createPrinter,
|
|
177736
|
+
createPrinterWithDefaults: () => createPrinterWithDefaults,
|
|
177737
|
+
createPrinterWithRemoveComments: () => createPrinterWithRemoveComments,
|
|
177738
|
+
createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape,
|
|
177739
|
+
createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon,
|
|
177747
177740
|
createProgram: () => createProgram,
|
|
177748
177741
|
createProgramHost: () => createProgramHost,
|
|
177749
177742
|
createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral,
|
|
@@ -180096,6 +180089,10 @@ ${e.message}`;
|
|
|
180096
180089
|
createPatternMatcher: () => createPatternMatcher,
|
|
180097
180090
|
createPrependNodes: () => createPrependNodes,
|
|
180098
180091
|
createPrinter: () => createPrinter,
|
|
180092
|
+
createPrinterWithDefaults: () => createPrinterWithDefaults,
|
|
180093
|
+
createPrinterWithRemoveComments: () => createPrinterWithRemoveComments,
|
|
180094
|
+
createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape,
|
|
180095
|
+
createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon,
|
|
180099
180096
|
createProgram: () => createProgram,
|
|
180100
180097
|
createProgramHost: () => createProgramHost,
|
|
180101
180098
|
createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral,
|
package/lib/typescript.d.ts
CHANGED
|
@@ -6088,7 +6088,7 @@ declare namespace ts {
|
|
|
6088
6088
|
getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
|
|
6089
6089
|
getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
|
|
6090
6090
|
getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
|
|
6091
|
-
getDocCommentTemplateAtPosition(fileName: string, position: number, options?: DocCommentTemplateOptions): TextInsertion | undefined;
|
|
6091
|
+
getDocCommentTemplateAtPosition(fileName: string, position: number, options?: DocCommentTemplateOptions, formatOptions?: FormatCodeSettings): TextInsertion | undefined;
|
|
6092
6092
|
isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
|
|
6093
6093
|
/**
|
|
6094
6094
|
* This will return a defined result if the position is after the `>` of the opening tag, or somewhere in the text, of a JSXElement with no closing tag.
|