typescript 5.0.0-dev.20230116 → 5.0.0-dev.20230117
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 +1 -1
- package/lib/tsserver.js +14 -10
- package/lib/tsserverlibrary.js +14 -10
- package/lib/typescript.js +14 -10
- 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-dev.
|
|
26
|
+
var version = `${versionMajorMinor}.0-dev.20230117`;
|
|
27
27
|
|
|
28
28
|
// src/compiler/core.ts
|
|
29
29
|
var emptyArray = [];
|
package/lib/tsserver.js
CHANGED
|
@@ -2671,7 +2671,7 @@ __export(ts_server_exports3, {
|
|
|
2671
2671
|
|
|
2672
2672
|
// src/compiler/corePublic.ts
|
|
2673
2673
|
var versionMajorMinor = "5.0";
|
|
2674
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
2674
|
+
var version = `${versionMajorMinor}.0-dev.20230117`;
|
|
2675
2675
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2676
2676
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2677
2677
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -147175,6 +147175,7 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log,
|
|
|
147175
147175
|
void 0,
|
|
147176
147176
|
contextToken,
|
|
147177
147177
|
location,
|
|
147178
|
+
position,
|
|
147178
147179
|
sourceFile,
|
|
147179
147180
|
host,
|
|
147180
147181
|
program,
|
|
@@ -147500,7 +147501,7 @@ function completionNameForLiteral(sourceFile, preferences, literal) {
|
|
|
147500
147501
|
function createCompletionEntryForLiteral(sourceFile, preferences, literal) {
|
|
147501
147502
|
return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
|
|
147502
147503
|
}
|
|
147503
|
-
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
147504
|
+
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
147504
147505
|
let insertText;
|
|
147505
147506
|
let replacementSpan = getReplacementSpanForContextToken(replacementToken);
|
|
147506
147507
|
let data;
|
|
@@ -147558,7 +147559,7 @@ function createCompletionEntry(symbol, sortText, replacementToken, contextToken,
|
|
|
147558
147559
|
}
|
|
147559
147560
|
if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === CompletionKind.MemberLike && isClassLikeMemberCompletion(symbol, location, sourceFile)) {
|
|
147560
147561
|
let importAdder;
|
|
147561
|
-
({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext));
|
|
147562
|
+
({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext));
|
|
147562
147563
|
sortText = SortText.ClassMemberSnippets;
|
|
147563
147564
|
if (importAdder == null ? void 0 : importAdder.hasFixes()) {
|
|
147564
147565
|
hasAction = true;
|
|
@@ -147622,7 +147623,7 @@ function isClassLikeMemberCompletion(symbol, location, sourceFile) {
|
|
|
147622
147623
|
const memberFlags = 106500 /* ClassMember */ & 900095 /* EnumMemberExcludes */;
|
|
147623
147624
|
return !!(symbol.flags & memberFlags) && (isClassLike(location) || location.parent && location.parent.parent && isClassElement(location.parent) && location === location.parent.name && location.parent.getLastToken(sourceFile) === location.parent.name && isClassLike(location.parent.parent) || location.parent && isSyntaxList(location) && isClassLike(location.parent));
|
|
147624
147625
|
}
|
|
147625
|
-
function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext) {
|
|
147626
|
+
function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext) {
|
|
147626
147627
|
const classLikeDeclaration = findAncestor(location, isClassLike);
|
|
147627
147628
|
if (!classLikeDeclaration) {
|
|
147628
147629
|
return { insertText: name };
|
|
@@ -147658,7 +147659,7 @@ function getEntryForMemberCompletion(host, program, options, preferences, name,
|
|
|
147658
147659
|
);
|
|
147659
147660
|
}
|
|
147660
147661
|
let modifiers = 0 /* None */;
|
|
147661
|
-
const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken);
|
|
147662
|
+
const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken, sourceFile, position);
|
|
147662
147663
|
const isAbstract = !!(presentModifiers & 256 /* Abstract */);
|
|
147663
147664
|
const completionNodes = [];
|
|
147664
147665
|
ts_codefix_exports.addNewNodeForMemberSymbol(
|
|
@@ -147713,8 +147714,8 @@ function getEntryForMemberCompletion(host, program, options, preferences, name,
|
|
|
147713
147714
|
}
|
|
147714
147715
|
return { insertText, isSnippet, importAdder, replacementSpan };
|
|
147715
147716
|
}
|
|
147716
|
-
function getPresentModifiers(contextToken) {
|
|
147717
|
-
if (!contextToken) {
|
|
147717
|
+
function getPresentModifiers(contextToken, sourceFile, position) {
|
|
147718
|
+
if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) {
|
|
147718
147719
|
return { modifiers: 0 /* None */ };
|
|
147719
147720
|
}
|
|
147720
147721
|
let modifiers = 0 /* None */;
|
|
@@ -148080,7 +148081,7 @@ function getSourceFromOrigin(origin) {
|
|
|
148080
148081
|
return "TypeOnlyAlias/" /* TypeOnlyAlias */;
|
|
148081
148082
|
}
|
|
148082
148083
|
}
|
|
148083
|
-
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
148084
|
+
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
148084
148085
|
var _a2;
|
|
148085
148086
|
const start2 = timestamp();
|
|
148086
148087
|
const variableDeclaration = getVariableDeclaration(location);
|
|
@@ -148103,6 +148104,7 @@ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, con
|
|
|
148103
148104
|
replacementToken,
|
|
148104
148105
|
contextToken,
|
|
148105
148106
|
location,
|
|
148107
|
+
position,
|
|
148106
148108
|
sourceFile,
|
|
148107
148109
|
host,
|
|
148108
148110
|
program,
|
|
@@ -148346,6 +148348,7 @@ function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextTo
|
|
|
148346
148348
|
name,
|
|
148347
148349
|
symbol,
|
|
148348
148350
|
location,
|
|
148351
|
+
position,
|
|
148349
148352
|
contextToken,
|
|
148350
148353
|
formatContext
|
|
148351
148354
|
);
|
|
@@ -150332,10 +150335,10 @@ function getStringLiteralCompletions(sourceFile, position, contextToken, options
|
|
|
150332
150335
|
if (!contextToken || !isStringLiteralLike(contextToken))
|
|
150333
150336
|
return void 0;
|
|
150334
150337
|
const entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, program.getTypeChecker(), options, host, preferences);
|
|
150335
|
-
return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences);
|
|
150338
|
+
return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences, position);
|
|
150336
150339
|
}
|
|
150337
150340
|
}
|
|
150338
|
-
function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences) {
|
|
150341
|
+
function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences, position) {
|
|
150339
150342
|
if (completion === void 0) {
|
|
150340
150343
|
return void 0;
|
|
150341
150344
|
}
|
|
@@ -150351,6 +150354,7 @@ function convertStringLiteralCompletions(completion, contextToken, sourceFile, h
|
|
|
150351
150354
|
contextToken,
|
|
150352
150355
|
contextToken,
|
|
150353
150356
|
sourceFile,
|
|
150357
|
+
position,
|
|
150354
150358
|
sourceFile,
|
|
150355
150359
|
host,
|
|
150356
150360
|
program,
|
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-dev.
|
|
45
|
+
version = `${versionMajorMinor}.0-dev.20230117`;
|
|
46
46
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
47
47
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
48
48
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -143223,6 +143223,7 @@ ${lanes.join("\n")}
|
|
|
143223
143223
|
void 0,
|
|
143224
143224
|
contextToken,
|
|
143225
143225
|
location,
|
|
143226
|
+
position,
|
|
143226
143227
|
sourceFile,
|
|
143227
143228
|
host,
|
|
143228
143229
|
program,
|
|
@@ -143548,7 +143549,7 @@ ${lanes.join("\n")}
|
|
|
143548
143549
|
function createCompletionEntryForLiteral(sourceFile, preferences, literal) {
|
|
143549
143550
|
return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
|
|
143550
143551
|
}
|
|
143551
|
-
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
143552
|
+
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
143552
143553
|
let insertText;
|
|
143553
143554
|
let replacementSpan = getReplacementSpanForContextToken(replacementToken);
|
|
143554
143555
|
let data;
|
|
@@ -143606,7 +143607,7 @@ ${lanes.join("\n")}
|
|
|
143606
143607
|
}
|
|
143607
143608
|
if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === CompletionKind.MemberLike && isClassLikeMemberCompletion(symbol, location, sourceFile)) {
|
|
143608
143609
|
let importAdder;
|
|
143609
|
-
({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext));
|
|
143610
|
+
({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext));
|
|
143610
143611
|
sortText = SortText.ClassMemberSnippets;
|
|
143611
143612
|
if (importAdder == null ? void 0 : importAdder.hasFixes()) {
|
|
143612
143613
|
hasAction = true;
|
|
@@ -143670,7 +143671,7 @@ ${lanes.join("\n")}
|
|
|
143670
143671
|
const memberFlags = 106500 /* ClassMember */ & 900095 /* EnumMemberExcludes */;
|
|
143671
143672
|
return !!(symbol.flags & memberFlags) && (isClassLike(location) || location.parent && location.parent.parent && isClassElement(location.parent) && location === location.parent.name && location.parent.getLastToken(sourceFile) === location.parent.name && isClassLike(location.parent.parent) || location.parent && isSyntaxList(location) && isClassLike(location.parent));
|
|
143672
143673
|
}
|
|
143673
|
-
function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext) {
|
|
143674
|
+
function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext) {
|
|
143674
143675
|
const classLikeDeclaration = findAncestor(location, isClassLike);
|
|
143675
143676
|
if (!classLikeDeclaration) {
|
|
143676
143677
|
return { insertText: name };
|
|
@@ -143706,7 +143707,7 @@ ${lanes.join("\n")}
|
|
|
143706
143707
|
);
|
|
143707
143708
|
}
|
|
143708
143709
|
let modifiers = 0 /* None */;
|
|
143709
|
-
const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken);
|
|
143710
|
+
const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken, sourceFile, position);
|
|
143710
143711
|
const isAbstract = !!(presentModifiers & 256 /* Abstract */);
|
|
143711
143712
|
const completionNodes = [];
|
|
143712
143713
|
ts_codefix_exports.addNewNodeForMemberSymbol(
|
|
@@ -143761,8 +143762,8 @@ ${lanes.join("\n")}
|
|
|
143761
143762
|
}
|
|
143762
143763
|
return { insertText, isSnippet, importAdder, replacementSpan };
|
|
143763
143764
|
}
|
|
143764
|
-
function getPresentModifiers(contextToken) {
|
|
143765
|
-
if (!contextToken) {
|
|
143765
|
+
function getPresentModifiers(contextToken, sourceFile, position) {
|
|
143766
|
+
if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) {
|
|
143766
143767
|
return { modifiers: 0 /* None */ };
|
|
143767
143768
|
}
|
|
143768
143769
|
let modifiers = 0 /* None */;
|
|
@@ -144128,7 +144129,7 @@ ${lanes.join("\n")}
|
|
|
144128
144129
|
return "TypeOnlyAlias/" /* TypeOnlyAlias */;
|
|
144129
144130
|
}
|
|
144130
144131
|
}
|
|
144131
|
-
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
144132
|
+
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
144132
144133
|
var _a2;
|
|
144133
144134
|
const start = timestamp();
|
|
144134
144135
|
const variableDeclaration = getVariableDeclaration(location);
|
|
@@ -144151,6 +144152,7 @@ ${lanes.join("\n")}
|
|
|
144151
144152
|
replacementToken,
|
|
144152
144153
|
contextToken,
|
|
144153
144154
|
location,
|
|
144155
|
+
position,
|
|
144154
144156
|
sourceFile,
|
|
144155
144157
|
host,
|
|
144156
144158
|
program,
|
|
@@ -144394,6 +144396,7 @@ ${lanes.join("\n")}
|
|
|
144394
144396
|
name,
|
|
144395
144397
|
symbol,
|
|
144396
144398
|
location,
|
|
144399
|
+
position,
|
|
144397
144400
|
contextToken,
|
|
144398
144401
|
formatContext
|
|
144399
144402
|
);
|
|
@@ -146422,10 +146425,10 @@ ${lanes.join("\n")}
|
|
|
146422
146425
|
if (!contextToken || !isStringLiteralLike(contextToken))
|
|
146423
146426
|
return void 0;
|
|
146424
146427
|
const entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, program.getTypeChecker(), options, host, preferences);
|
|
146425
|
-
return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences);
|
|
146428
|
+
return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences, position);
|
|
146426
146429
|
}
|
|
146427
146430
|
}
|
|
146428
|
-
function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences) {
|
|
146431
|
+
function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences, position) {
|
|
146429
146432
|
if (completion === void 0) {
|
|
146430
146433
|
return void 0;
|
|
146431
146434
|
}
|
|
@@ -146441,6 +146444,7 @@ ${lanes.join("\n")}
|
|
|
146441
146444
|
contextToken,
|
|
146442
146445
|
contextToken,
|
|
146443
146446
|
sourceFile,
|
|
146447
|
+
position,
|
|
146444
146448
|
sourceFile,
|
|
146445
146449
|
host,
|
|
146446
146450
|
program,
|
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-dev.
|
|
45
|
+
version = `${versionMajorMinor}.0-dev.20230117`;
|
|
46
46
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
47
47
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
48
48
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -143237,6 +143237,7 @@ ${lanes.join("\n")}
|
|
|
143237
143237
|
void 0,
|
|
143238
143238
|
contextToken,
|
|
143239
143239
|
location,
|
|
143240
|
+
position,
|
|
143240
143241
|
sourceFile,
|
|
143241
143242
|
host,
|
|
143242
143243
|
program,
|
|
@@ -143562,7 +143563,7 @@ ${lanes.join("\n")}
|
|
|
143562
143563
|
function createCompletionEntryForLiteral(sourceFile, preferences, literal) {
|
|
143563
143564
|
return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
|
|
143564
143565
|
}
|
|
143565
|
-
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
143566
|
+
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
143566
143567
|
let insertText;
|
|
143567
143568
|
let replacementSpan = getReplacementSpanForContextToken(replacementToken);
|
|
143568
143569
|
let data;
|
|
@@ -143620,7 +143621,7 @@ ${lanes.join("\n")}
|
|
|
143620
143621
|
}
|
|
143621
143622
|
if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === CompletionKind.MemberLike && isClassLikeMemberCompletion(symbol, location, sourceFile)) {
|
|
143622
143623
|
let importAdder;
|
|
143623
|
-
({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext));
|
|
143624
|
+
({ insertText, isSnippet, importAdder, replacementSpan } = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext));
|
|
143624
143625
|
sortText = SortText.ClassMemberSnippets;
|
|
143625
143626
|
if (importAdder == null ? void 0 : importAdder.hasFixes()) {
|
|
143626
143627
|
hasAction = true;
|
|
@@ -143684,7 +143685,7 @@ ${lanes.join("\n")}
|
|
|
143684
143685
|
const memberFlags = 106500 /* ClassMember */ & 900095 /* EnumMemberExcludes */;
|
|
143685
143686
|
return !!(symbol.flags & memberFlags) && (isClassLike(location) || location.parent && location.parent.parent && isClassElement(location.parent) && location === location.parent.name && location.parent.getLastToken(sourceFile) === location.parent.name && isClassLike(location.parent.parent) || location.parent && isSyntaxList(location) && isClassLike(location.parent));
|
|
143686
143687
|
}
|
|
143687
|
-
function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext) {
|
|
143688
|
+
function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext) {
|
|
143688
143689
|
const classLikeDeclaration = findAncestor(location, isClassLike);
|
|
143689
143690
|
if (!classLikeDeclaration) {
|
|
143690
143691
|
return { insertText: name };
|
|
@@ -143720,7 +143721,7 @@ ${lanes.join("\n")}
|
|
|
143720
143721
|
);
|
|
143721
143722
|
}
|
|
143722
143723
|
let modifiers = 0 /* None */;
|
|
143723
|
-
const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken);
|
|
143724
|
+
const { modifiers: presentModifiers, span: modifiersSpan } = getPresentModifiers(contextToken, sourceFile, position);
|
|
143724
143725
|
const isAbstract = !!(presentModifiers & 256 /* Abstract */);
|
|
143725
143726
|
const completionNodes = [];
|
|
143726
143727
|
ts_codefix_exports.addNewNodeForMemberSymbol(
|
|
@@ -143775,8 +143776,8 @@ ${lanes.join("\n")}
|
|
|
143775
143776
|
}
|
|
143776
143777
|
return { insertText, isSnippet, importAdder, replacementSpan };
|
|
143777
143778
|
}
|
|
143778
|
-
function getPresentModifiers(contextToken) {
|
|
143779
|
-
if (!contextToken) {
|
|
143779
|
+
function getPresentModifiers(contextToken, sourceFile, position) {
|
|
143780
|
+
if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) {
|
|
143780
143781
|
return { modifiers: 0 /* None */ };
|
|
143781
143782
|
}
|
|
143782
143783
|
let modifiers = 0 /* None */;
|
|
@@ -144142,7 +144143,7 @@ ${lanes.join("\n")}
|
|
|
144142
144143
|
return "TypeOnlyAlias/" /* TypeOnlyAlias */;
|
|
144143
144144
|
}
|
|
144144
144145
|
}
|
|
144145
|
-
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
144146
|
+
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
144146
144147
|
var _a2;
|
|
144147
144148
|
const start = timestamp();
|
|
144148
144149
|
const variableDeclaration = getVariableDeclaration(location);
|
|
@@ -144165,6 +144166,7 @@ ${lanes.join("\n")}
|
|
|
144165
144166
|
replacementToken,
|
|
144166
144167
|
contextToken,
|
|
144167
144168
|
location,
|
|
144169
|
+
position,
|
|
144168
144170
|
sourceFile,
|
|
144169
144171
|
host,
|
|
144170
144172
|
program,
|
|
@@ -144408,6 +144410,7 @@ ${lanes.join("\n")}
|
|
|
144408
144410
|
name,
|
|
144409
144411
|
symbol,
|
|
144410
144412
|
location,
|
|
144413
|
+
position,
|
|
144411
144414
|
contextToken,
|
|
144412
144415
|
formatContext
|
|
144413
144416
|
);
|
|
@@ -146436,10 +146439,10 @@ ${lanes.join("\n")}
|
|
|
146436
146439
|
if (!contextToken || !isStringLiteralLike(contextToken))
|
|
146437
146440
|
return void 0;
|
|
146438
146441
|
const entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, program.getTypeChecker(), options, host, preferences);
|
|
146439
|
-
return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences);
|
|
146442
|
+
return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences, position);
|
|
146440
146443
|
}
|
|
146441
146444
|
}
|
|
146442
|
-
function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences) {
|
|
146445
|
+
function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences, position) {
|
|
146443
146446
|
if (completion === void 0) {
|
|
146444
146447
|
return void 0;
|
|
146445
146448
|
}
|
|
@@ -146455,6 +146458,7 @@ ${lanes.join("\n")}
|
|
|
146455
146458
|
contextToken,
|
|
146456
146459
|
contextToken,
|
|
146457
146460
|
sourceFile,
|
|
146461
|
+
position,
|
|
146458
146462
|
sourceFile,
|
|
146459
146463
|
host,
|
|
146460
146464
|
program,
|
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-dev.
|
|
57
|
+
var version = `${versionMajorMinor}.0-dev.20230117`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "typescript",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.0.0-dev.
|
|
5
|
+
"version": "5.0.0-dev.20230117",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|