@typescript-deploys/pr-build 5.0.0-pr-52244-8 → 5.0.0-pr-52403-9
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 +3 -4
- package/lib/tsserver.js +14 -16
- package/lib/tsserverlibrary.d.ts +1 -1
- package/lib/tsserverlibrary.js +14 -16
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +13 -15
- package/lib/typingsInstaller.js +1 -1
- 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 = [];
|
|
@@ -64727,7 +64727,7 @@ function createTypeChecker(host) {
|
|
|
64727
64727
|
return getNonMissingTypeOfSymbol(symbol);
|
|
64728
64728
|
}
|
|
64729
64729
|
function getControlFlowContainer(node) {
|
|
64730
|
-
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind ===
|
|
64730
|
+
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */);
|
|
64731
64731
|
}
|
|
64732
64732
|
function isSymbolAssigned(symbol) {
|
|
64733
64733
|
if (!symbol.valueDeclaration) {
|
|
@@ -64988,14 +64988,13 @@ function createTypeChecker(host) {
|
|
|
64988
64988
|
const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */;
|
|
64989
64989
|
const declarationContainer = getControlFlowContainer(declaration);
|
|
64990
64990
|
let flowContainer = getControlFlowContainer(node);
|
|
64991
|
-
const isCatch = flowContainer.kind === 295 /* CatchClause */;
|
|
64992
64991
|
const isOuterVariable = flowContainer !== declarationContainer;
|
|
64993
64992
|
const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);
|
|
64994
64993
|
const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;
|
|
64995
64994
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) {
|
|
64996
64995
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
64997
64996
|
}
|
|
64998
|
-
const assumeInitialized = isParameter2 ||
|
|
64997
|
+
const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */;
|
|
64999
64998
|
const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type);
|
|
65000
64999
|
const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
65001
65000
|
if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
|
package/lib/tsserver.js
CHANGED
|
@@ -2373,7 +2373,7 @@ __export(ts_server_exports3, {
|
|
|
2373
2373
|
|
|
2374
2374
|
// src/compiler/corePublic.ts
|
|
2375
2375
|
var versionMajorMinor = "5.0";
|
|
2376
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2376
|
+
var version = `${versionMajorMinor}.0-insiders.20230125`;
|
|
2377
2377
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2378
2378
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2379
2379
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -69396,7 +69396,7 @@ function createTypeChecker(host) {
|
|
|
69396
69396
|
return getNonMissingTypeOfSymbol(symbol);
|
|
69397
69397
|
}
|
|
69398
69398
|
function getControlFlowContainer(node) {
|
|
69399
|
-
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind ===
|
|
69399
|
+
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */);
|
|
69400
69400
|
}
|
|
69401
69401
|
function isSymbolAssigned(symbol) {
|
|
69402
69402
|
if (!symbol.valueDeclaration) {
|
|
@@ -69657,14 +69657,13 @@ function createTypeChecker(host) {
|
|
|
69657
69657
|
const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */;
|
|
69658
69658
|
const declarationContainer = getControlFlowContainer(declaration);
|
|
69659
69659
|
let flowContainer = getControlFlowContainer(node);
|
|
69660
|
-
const isCatch = flowContainer.kind === 295 /* CatchClause */;
|
|
69661
69660
|
const isOuterVariable = flowContainer !== declarationContainer;
|
|
69662
69661
|
const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);
|
|
69663
69662
|
const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;
|
|
69664
69663
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) {
|
|
69665
69664
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
69666
69665
|
}
|
|
69667
|
-
const assumeInitialized = isParameter2 ||
|
|
69666
|
+
const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */;
|
|
69668
69667
|
const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type);
|
|
69669
69668
|
const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
69670
69669
|
if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
|
|
@@ -137389,12 +137388,9 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
|
137389
137388
|
Debug.assertEqual(action.type, "install package");
|
|
137390
137389
|
return host.installPackage ? host.installPackage({ fileName: getPath(action.file), packageName: action.packageName }) : Promise.reject("Host does not implement `installPackage`");
|
|
137391
137390
|
}
|
|
137392
|
-
function getDocCommentTemplateAtPosition2(fileName, position, options) {
|
|
137393
|
-
|
|
137394
|
-
|
|
137395
|
-
/*formatSettings*/
|
|
137396
|
-
void 0
|
|
137397
|
-
), syntaxTreeCache.getCurrentSourceFile(fileName), position, options);
|
|
137391
|
+
function getDocCommentTemplateAtPosition2(fileName, position, options, formatOptions) {
|
|
137392
|
+
const formatSettings = formatOptions ? ts_formatting_exports.getFormatContext(formatOptions, host).options : void 0;
|
|
137393
|
+
return ts_JsDoc_exports.getDocCommentTemplateAtPosition(getNewLineOrDefaultFromHost(host, formatSettings), syntaxTreeCache.getCurrentSourceFile(fileName), position, options);
|
|
137398
137394
|
}
|
|
137399
137395
|
function isValidBraceCompletionAtPosition(fileName, position, openingBrace) {
|
|
137400
137396
|
if (openingBrace === 60 /* lessThan */) {
|
|
@@ -138575,10 +138571,10 @@ var LanguageServiceShimObject = class extends ShimBase {
|
|
|
138575
138571
|
}
|
|
138576
138572
|
);
|
|
138577
138573
|
}
|
|
138578
|
-
getDocCommentTemplateAtPosition(fileName, position, options) {
|
|
138574
|
+
getDocCommentTemplateAtPosition(fileName, position, options, formatOptions) {
|
|
138579
138575
|
return this.forwardJSONCall(
|
|
138580
138576
|
`getDocCommentTemplateAtPosition('${fileName}', ${position})`,
|
|
138581
|
-
() => this.languageService.getDocCommentTemplateAtPosition(fileName, position, options)
|
|
138577
|
+
() => this.languageService.getDocCommentTemplateAtPosition(fileName, position, options, formatOptions)
|
|
138582
138578
|
);
|
|
138583
138579
|
}
|
|
138584
138580
|
/// NAVIGATE TO
|
|
@@ -157331,6 +157327,8 @@ var jsDocTagNames = [
|
|
|
157331
157327
|
"lends",
|
|
157332
157328
|
"license",
|
|
157333
157329
|
"link",
|
|
157330
|
+
"linkcode",
|
|
157331
|
+
"linkplain",
|
|
157334
157332
|
"listens",
|
|
157335
157333
|
"member",
|
|
157336
157334
|
"memberof",
|
|
@@ -157343,6 +157341,7 @@ var jsDocTagNames = [
|
|
|
157343
157341
|
"package",
|
|
157344
157342
|
"param",
|
|
157345
157343
|
"private",
|
|
157344
|
+
"prop",
|
|
157346
157345
|
"property",
|
|
157347
157346
|
"protected",
|
|
157348
157347
|
"public",
|
|
@@ -164752,16 +164751,15 @@ function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, so
|
|
|
164752
164751
|
writeTypeParametersOfSymbol(symbol, sourceFile);
|
|
164753
164752
|
}
|
|
164754
164753
|
if (symbolFlags & 524288 /* TypeAlias */ && semanticMeaning & 2 /* Type */) {
|
|
164755
|
-
const exportSymbol = typeChecker.getExportSymbolOfSymbol(symbol);
|
|
164756
164754
|
prefixNextMeaning();
|
|
164757
164755
|
displayParts.push(keywordPart(154 /* TypeKeyword */));
|
|
164758
164756
|
displayParts.push(spacePart());
|
|
164759
164757
|
addFullSymbolName(symbol);
|
|
164760
|
-
writeTypeParametersOfSymbol(
|
|
164758
|
+
writeTypeParametersOfSymbol(symbol, sourceFile);
|
|
164761
164759
|
displayParts.push(spacePart());
|
|
164762
164760
|
displayParts.push(operatorPart(63 /* EqualsToken */));
|
|
164763
164761
|
displayParts.push(spacePart());
|
|
164764
|
-
addRange(displayParts, typeToDisplayParts(typeChecker, isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(
|
|
164762
|
+
addRange(displayParts, typeToDisplayParts(typeChecker, isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 8388608 /* InTypeAlias */));
|
|
164765
164763
|
}
|
|
164766
164764
|
if (symbolFlags & 384 /* Enum */) {
|
|
164767
164765
|
prefixNextMeaning();
|
|
@@ -178154,7 +178152,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
178154
178152
|
getDocCommentTemplate(args) {
|
|
178155
178153
|
const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);
|
|
178156
178154
|
const position = this.getPositionInFile(args, file);
|
|
178157
|
-
return languageService.getDocCommentTemplateAtPosition(file, position, this.getPreferences(file));
|
|
178155
|
+
return languageService.getDocCommentTemplateAtPosition(file, position, this.getPreferences(file), this.getFormatOptions(file));
|
|
178158
178156
|
}
|
|
178159
178157
|
getSpanOfEnclosingComment(args) {
|
|
178160
178158
|
const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);
|
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";
|
|
@@ -67127,7 +67127,7 @@ ${lanes.join("\n")}
|
|
|
67127
67127
|
return getNonMissingTypeOfSymbol(symbol);
|
|
67128
67128
|
}
|
|
67129
67129
|
function getControlFlowContainer(node) {
|
|
67130
|
-
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind ===
|
|
67130
|
+
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */);
|
|
67131
67131
|
}
|
|
67132
67132
|
function isSymbolAssigned(symbol) {
|
|
67133
67133
|
if (!symbol.valueDeclaration) {
|
|
@@ -67388,14 +67388,13 @@ ${lanes.join("\n")}
|
|
|
67388
67388
|
const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */;
|
|
67389
67389
|
const declarationContainer = getControlFlowContainer(declaration);
|
|
67390
67390
|
let flowContainer = getControlFlowContainer(node);
|
|
67391
|
-
const isCatch = flowContainer.kind === 295 /* CatchClause */;
|
|
67392
67391
|
const isOuterVariable = flowContainer !== declarationContainer;
|
|
67393
67392
|
const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);
|
|
67394
67393
|
const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;
|
|
67395
67394
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) {
|
|
67396
67395
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
67397
67396
|
}
|
|
67398
|
-
const assumeInitialized = isParameter2 ||
|
|
67397
|
+
const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */;
|
|
67399
67398
|
const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type);
|
|
67400
67399
|
const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
67401
67400
|
if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
|
|
@@ -132743,12 +132742,9 @@ ${lanes.join("\n")}
|
|
|
132743
132742
|
Debug.assertEqual(action.type, "install package");
|
|
132744
132743
|
return host.installPackage ? host.installPackage({ fileName: getPath(action.file), packageName: action.packageName }) : Promise.reject("Host does not implement `installPackage`");
|
|
132745
132744
|
}
|
|
132746
|
-
function getDocCommentTemplateAtPosition2(fileName, position, options) {
|
|
132747
|
-
|
|
132748
|
-
|
|
132749
|
-
/*formatSettings*/
|
|
132750
|
-
void 0
|
|
132751
|
-
), syntaxTreeCache.getCurrentSourceFile(fileName), position, options);
|
|
132745
|
+
function getDocCommentTemplateAtPosition2(fileName, position, options, formatOptions) {
|
|
132746
|
+
const formatSettings = formatOptions ? ts_formatting_exports.getFormatContext(formatOptions, host).options : void 0;
|
|
132747
|
+
return ts_JsDoc_exports.getDocCommentTemplateAtPosition(getNewLineOrDefaultFromHost(host, formatSettings), syntaxTreeCache.getCurrentSourceFile(fileName), position, options);
|
|
132752
132748
|
}
|
|
132753
132749
|
function isValidBraceCompletionAtPosition(fileName, position, openingBrace) {
|
|
132754
132750
|
if (openingBrace === 60 /* lessThan */) {
|
|
@@ -134620,10 +134616,10 @@ ${lanes.join("\n")}
|
|
|
134620
134616
|
}
|
|
134621
134617
|
);
|
|
134622
134618
|
}
|
|
134623
|
-
getDocCommentTemplateAtPosition(fileName, position, options) {
|
|
134619
|
+
getDocCommentTemplateAtPosition(fileName, position, options, formatOptions) {
|
|
134624
134620
|
return this.forwardJSONCall(
|
|
134625
134621
|
`getDocCommentTemplateAtPosition('${fileName}', ${position})`,
|
|
134626
|
-
() => this.languageService.getDocCommentTemplateAtPosition(fileName, position, options)
|
|
134622
|
+
() => this.languageService.getDocCommentTemplateAtPosition(fileName, position, options, formatOptions)
|
|
134627
134623
|
);
|
|
134628
134624
|
}
|
|
134629
134625
|
/// NAVIGATE TO
|
|
@@ -154415,6 +154411,8 @@ ${lanes.join("\n")}
|
|
|
154415
154411
|
"lends",
|
|
154416
154412
|
"license",
|
|
154417
154413
|
"link",
|
|
154414
|
+
"linkcode",
|
|
154415
|
+
"linkplain",
|
|
154418
154416
|
"listens",
|
|
154419
154417
|
"member",
|
|
154420
154418
|
"memberof",
|
|
@@ -154427,6 +154425,7 @@ ${lanes.join("\n")}
|
|
|
154427
154425
|
"package",
|
|
154428
154426
|
"param",
|
|
154429
154427
|
"private",
|
|
154428
|
+
"prop",
|
|
154430
154429
|
"property",
|
|
154431
154430
|
"protected",
|
|
154432
154431
|
"public",
|
|
@@ -161784,16 +161783,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
161784
161783
|
writeTypeParametersOfSymbol(symbol, sourceFile);
|
|
161785
161784
|
}
|
|
161786
161785
|
if (symbolFlags & 524288 /* TypeAlias */ && semanticMeaning & 2 /* Type */) {
|
|
161787
|
-
const exportSymbol = typeChecker.getExportSymbolOfSymbol(symbol);
|
|
161788
161786
|
prefixNextMeaning();
|
|
161789
161787
|
displayParts.push(keywordPart(154 /* TypeKeyword */));
|
|
161790
161788
|
displayParts.push(spacePart());
|
|
161791
161789
|
addFullSymbolName(symbol);
|
|
161792
|
-
writeTypeParametersOfSymbol(
|
|
161790
|
+
writeTypeParametersOfSymbol(symbol, sourceFile);
|
|
161793
161791
|
displayParts.push(spacePart());
|
|
161794
161792
|
displayParts.push(operatorPart(63 /* EqualsToken */));
|
|
161795
161793
|
displayParts.push(spacePart());
|
|
161796
|
-
addRange(displayParts, typeToDisplayParts(typeChecker, isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(
|
|
161794
|
+
addRange(displayParts, typeToDisplayParts(typeChecker, isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 8388608 /* InTypeAlias */));
|
|
161797
161795
|
}
|
|
161798
161796
|
if (symbolFlags & 384 /* Enum */) {
|
|
161799
161797
|
prefixNextMeaning();
|
|
@@ -175500,7 +175498,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
175500
175498
|
getDocCommentTemplate(args) {
|
|
175501
175499
|
const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);
|
|
175502
175500
|
const position = this.getPositionInFile(args, file);
|
|
175503
|
-
return languageService.getDocCommentTemplateAtPosition(file, position, this.getPreferences(file));
|
|
175501
|
+
return languageService.getDocCommentTemplateAtPosition(file, position, this.getPreferences(file), this.getFormatOptions(file));
|
|
175504
175502
|
}
|
|
175505
175503
|
getSpanOfEnclosingComment(args) {
|
|
175506
175504
|
const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args);
|
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.
|
package/lib/typescript.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";
|
|
@@ -67127,7 +67127,7 @@ ${lanes.join("\n")}
|
|
|
67127
67127
|
return getNonMissingTypeOfSymbol(symbol);
|
|
67128
67128
|
}
|
|
67129
67129
|
function getControlFlowContainer(node) {
|
|
67130
|
-
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind ===
|
|
67130
|
+
return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 265 /* ModuleBlock */ || node2.kind === 308 /* SourceFile */ || node2.kind === 169 /* PropertyDeclaration */);
|
|
67131
67131
|
}
|
|
67132
67132
|
function isSymbolAssigned(symbol) {
|
|
67133
67133
|
if (!symbol.valueDeclaration) {
|
|
@@ -67388,14 +67388,13 @@ ${lanes.join("\n")}
|
|
|
67388
67388
|
const isParameter2 = getRootDeclaration(declaration).kind === 166 /* Parameter */;
|
|
67389
67389
|
const declarationContainer = getControlFlowContainer(declaration);
|
|
67390
67390
|
let flowContainer = getControlFlowContainer(node);
|
|
67391
|
-
const isCatch = flowContainer.kind === 295 /* CatchClause */;
|
|
67392
67391
|
const isOuterVariable = flowContainer !== declarationContainer;
|
|
67393
67392
|
const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);
|
|
67394
67393
|
const isModuleExports = symbol.flags & 134217728 /* ModuleExports */;
|
|
67395
67394
|
while (flowContainer !== declarationContainer && (flowContainer.kind === 215 /* FunctionExpression */ || flowContainer.kind === 216 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) {
|
|
67396
67395
|
flowContainer = getControlFlowContainer(flowContainer);
|
|
67397
67396
|
}
|
|
67398
|
-
const assumeInitialized = isParameter2 ||
|
|
67397
|
+
const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 278 /* ExportSpecifier */) || node.parent.kind === 232 /* NonNullExpression */ || declaration.kind === 257 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 16777216 /* Ambient */;
|
|
67399
67398
|
const initialType = assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : type === autoType || type === autoArrayType ? undefinedType : getOptionalType(type);
|
|
67400
67399
|
const flowType = getFlowTypeOfReference(node, type, initialType, flowContainer);
|
|
67401
67400
|
if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
|
|
@@ -132757,12 +132756,9 @@ ${lanes.join("\n")}
|
|
|
132757
132756
|
Debug.assertEqual(action.type, "install package");
|
|
132758
132757
|
return host.installPackage ? host.installPackage({ fileName: getPath(action.file), packageName: action.packageName }) : Promise.reject("Host does not implement `installPackage`");
|
|
132759
132758
|
}
|
|
132760
|
-
function getDocCommentTemplateAtPosition2(fileName, position, options) {
|
|
132761
|
-
|
|
132762
|
-
|
|
132763
|
-
/*formatSettings*/
|
|
132764
|
-
void 0
|
|
132765
|
-
), syntaxTreeCache.getCurrentSourceFile(fileName), position, options);
|
|
132759
|
+
function getDocCommentTemplateAtPosition2(fileName, position, options, formatOptions) {
|
|
132760
|
+
const formatSettings = formatOptions ? ts_formatting_exports.getFormatContext(formatOptions, host).options : void 0;
|
|
132761
|
+
return ts_JsDoc_exports.getDocCommentTemplateAtPosition(getNewLineOrDefaultFromHost(host, formatSettings), syntaxTreeCache.getCurrentSourceFile(fileName), position, options);
|
|
132766
132762
|
}
|
|
132767
132763
|
function isValidBraceCompletionAtPosition(fileName, position, openingBrace) {
|
|
132768
132764
|
if (openingBrace === 60 /* lessThan */) {
|
|
@@ -134634,10 +134630,10 @@ ${lanes.join("\n")}
|
|
|
134634
134630
|
}
|
|
134635
134631
|
);
|
|
134636
134632
|
}
|
|
134637
|
-
getDocCommentTemplateAtPosition(fileName, position, options) {
|
|
134633
|
+
getDocCommentTemplateAtPosition(fileName, position, options, formatOptions) {
|
|
134638
134634
|
return this.forwardJSONCall(
|
|
134639
134635
|
`getDocCommentTemplateAtPosition('${fileName}', ${position})`,
|
|
134640
|
-
() => this.languageService.getDocCommentTemplateAtPosition(fileName, position, options)
|
|
134636
|
+
() => this.languageService.getDocCommentTemplateAtPosition(fileName, position, options, formatOptions)
|
|
134641
134637
|
);
|
|
134642
134638
|
}
|
|
134643
134639
|
/// NAVIGATE TO
|
|
@@ -154429,6 +154425,8 @@ ${lanes.join("\n")}
|
|
|
154429
154425
|
"lends",
|
|
154430
154426
|
"license",
|
|
154431
154427
|
"link",
|
|
154428
|
+
"linkcode",
|
|
154429
|
+
"linkplain",
|
|
154432
154430
|
"listens",
|
|
154433
154431
|
"member",
|
|
154434
154432
|
"memberof",
|
|
@@ -154441,6 +154439,7 @@ ${lanes.join("\n")}
|
|
|
154441
154439
|
"package",
|
|
154442
154440
|
"param",
|
|
154443
154441
|
"private",
|
|
154442
|
+
"prop",
|
|
154444
154443
|
"property",
|
|
154445
154444
|
"protected",
|
|
154446
154445
|
"public",
|
|
@@ -161798,16 +161797,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
161798
161797
|
writeTypeParametersOfSymbol(symbol, sourceFile);
|
|
161799
161798
|
}
|
|
161800
161799
|
if (symbolFlags & 524288 /* TypeAlias */ && semanticMeaning & 2 /* Type */) {
|
|
161801
|
-
const exportSymbol = typeChecker.getExportSymbolOfSymbol(symbol);
|
|
161802
161800
|
prefixNextMeaning();
|
|
161803
161801
|
displayParts.push(keywordPart(154 /* TypeKeyword */));
|
|
161804
161802
|
displayParts.push(spacePart());
|
|
161805
161803
|
addFullSymbolName(symbol);
|
|
161806
|
-
writeTypeParametersOfSymbol(
|
|
161804
|
+
writeTypeParametersOfSymbol(symbol, sourceFile);
|
|
161807
161805
|
displayParts.push(spacePart());
|
|
161808
161806
|
displayParts.push(operatorPart(63 /* EqualsToken */));
|
|
161809
161807
|
displayParts.push(spacePart());
|
|
161810
|
-
addRange(displayParts, typeToDisplayParts(typeChecker, isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(
|
|
161808
|
+
addRange(displayParts, typeToDisplayParts(typeChecker, isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 8388608 /* InTypeAlias */));
|
|
161811
161809
|
}
|
|
161812
161810
|
if (symbolFlags & 384 /* Enum */) {
|
|
161813
161811
|
prefixNextMeaning();
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.0";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20230125`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.0.0-pr-
|
|
5
|
+
"version": "5.0.0-pr-52403-9",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|