typescript 4.6.0-dev.20220114 → 4.6.0-dev.20220115
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 +15 -10
- package/lib/tsserverlibrary.js +15 -10
- package/lib/typescript.js +15 -10
- package/lib/typescriptServices.js +15 -10
- package/lib/typingsInstaller.js +1 -1
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.6";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220115";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
function tryGetNativeMap() {
|
package/lib/tsserver.js
CHANGED
|
@@ -100,7 +100,7 @@ var ts;
|
|
|
100
100
|
// The following is baselined as a literal template type without intervention
|
|
101
101
|
/** The version of the TypeScript compiler release */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
103
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220115";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -129113,7 +129113,7 @@ var ts;
|
|
|
129113
129113
|
return (location === null || location === void 0 ? void 0 : location.kind) === 79 /* Identifier */ ? ts.createTextSpanFromNode(location) : undefined;
|
|
129114
129114
|
}
|
|
129115
129115
|
function completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext) {
|
|
129116
|
-
var symbols = completionData.symbols, contextToken = completionData.contextToken, completionKind = completionData.completionKind, isInSnippetScope = completionData.isInSnippetScope, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, propertyAccessToConvert = completionData.propertyAccessToConvert, keywordFilters = completionData.keywordFilters, literals = completionData.literals, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, recommendedCompletion = completionData.recommendedCompletion, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation, isJsxIdentifierExpected = completionData.isJsxIdentifierExpected, importCompletionNode = completionData.importCompletionNode, insideJsDocTagTypeExpression = completionData.insideJsDocTagTypeExpression, symbolToSortTextIdMap = completionData.symbolToSortTextIdMap, hasUnresolvedAutoImports = completionData.hasUnresolvedAutoImports;
|
|
129116
|
+
var symbols = completionData.symbols, contextToken = completionData.contextToken, completionKind = completionData.completionKind, isInSnippetScope = completionData.isInSnippetScope, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, propertyAccessToConvert = completionData.propertyAccessToConvert, keywordFilters = completionData.keywordFilters, literals = completionData.literals, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, recommendedCompletion = completionData.recommendedCompletion, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation, isJsxIdentifierExpected = completionData.isJsxIdentifierExpected, isRightOfOpenTag = completionData.isRightOfOpenTag, importCompletionNode = completionData.importCompletionNode, insideJsDocTagTypeExpression = completionData.insideJsDocTagTypeExpression, symbolToSortTextIdMap = completionData.symbolToSortTextIdMap, hasUnresolvedAutoImports = completionData.hasUnresolvedAutoImports;
|
|
129117
129117
|
// Verify if the file is JSX language variant
|
|
129118
129118
|
if (ts.getLanguageVariant(sourceFile.scriptKind) === 1 /* JSX */) {
|
|
129119
129119
|
var completionInfo = getJsxClosingTagCompletion(location, sourceFile);
|
|
@@ -129124,7 +129124,7 @@ var ts;
|
|
|
129124
129124
|
var entries = ts.createSortedArray();
|
|
129125
129125
|
if (isUncheckedFile(sourceFile, compilerOptions)) {
|
|
129126
129126
|
var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries,
|
|
129127
|
-
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap);
|
|
129127
|
+
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag);
|
|
129128
129128
|
getJSCompletionEntries(sourceFile, location.pos, uniqueNames, ts.getEmitScriptTarget(compilerOptions), entries); // TODO: GH#18217
|
|
129129
129129
|
}
|
|
129130
129130
|
else {
|
|
@@ -129132,7 +129132,7 @@ var ts;
|
|
|
129132
129132
|
return undefined;
|
|
129133
129133
|
}
|
|
129134
129134
|
getCompletionEntriesFromSymbols(symbols, entries,
|
|
129135
|
-
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap);
|
|
129135
|
+
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag);
|
|
129136
129136
|
}
|
|
129137
129137
|
if (keywordFilters !== 0 /* None */) {
|
|
129138
129138
|
var entryNames = new ts.Set(entries.map(function (e) { return e.name; }));
|
|
@@ -129238,7 +129238,7 @@ var ts;
|
|
|
129238
129238
|
function createCompletionEntryForLiteral(sourceFile, preferences, literal) {
|
|
129239
129239
|
return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
|
|
129240
129240
|
}
|
|
129241
|
-
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, options, preferences, completionKind, formatContext) {
|
|
129241
|
+
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
129242
129242
|
var _a, _b;
|
|
129243
129243
|
var insertText;
|
|
129244
129244
|
var replacementSpan = ts.getReplacementSpanForContextToken(replacementToken);
|
|
@@ -129309,8 +129309,7 @@ var ts;
|
|
|
129309
129309
|
source = CompletionSource.ClassMemberSnippet;
|
|
129310
129310
|
}
|
|
129311
129311
|
}
|
|
129312
|
-
|
|
129313
|
-
if (kind === "JSX attribute" /* jsxAttribute */ && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none") {
|
|
129312
|
+
if (isJsxIdentifierExpected && !isRightOfOpenTag && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none") {
|
|
129314
129313
|
var useBraces_1 = preferences.jsxAttributeCompletionStyle === "braces";
|
|
129315
129314
|
var type = typeChecker.getTypeOfSymbolAtLocation(symbol, location);
|
|
129316
129315
|
// If is boolean like or undefined, don't return a snippet we want just to return the completion.
|
|
@@ -129348,7 +129347,7 @@ var ts;
|
|
|
129348
129347
|
// entries (like JavaScript identifier entries).
|
|
129349
129348
|
return {
|
|
129350
129349
|
name: name,
|
|
129351
|
-
kind:
|
|
129350
|
+
kind: ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
|
|
129352
129351
|
kindModifiers: ts.SymbolDisplay.getSymbolModifiers(typeChecker, symbol),
|
|
129353
129352
|
sortText: sortText,
|
|
129354
129353
|
source: source,
|
|
@@ -129644,7 +129643,7 @@ var ts;
|
|
|
129644
129643
|
return CompletionSource.ThisProperty;
|
|
129645
129644
|
}
|
|
129646
129645
|
}
|
|
129647
|
-
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap) {
|
|
129646
|
+
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
129648
129647
|
var _a;
|
|
129649
129648
|
var start = ts.timestamp();
|
|
129650
129649
|
var variableDeclaration = getVariableDeclaration(location);
|
|
@@ -129665,7 +129664,7 @@ var ts;
|
|
|
129665
129664
|
var name = info.name, needsConvertPropertyAccess = info.needsConvertPropertyAccess;
|
|
129666
129665
|
var sortTextId = (_a = symbolToSortTextIdMap === null || symbolToSortTextIdMap === void 0 ? void 0 : symbolToSortTextIdMap[ts.getSymbolId(symbol)]) !== null && _a !== void 0 ? _a : 11 /* LocationPriority */;
|
|
129667
129666
|
var sortText = (isDeprecated(symbol, typeChecker) ? 8 /* DeprecatedOffset */ + sortTextId : sortTextId).toString();
|
|
129668
|
-
var entry = createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, compilerOptions, preferences, kind, formatContext);
|
|
129667
|
+
var entry = createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, compilerOptions, preferences, kind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag);
|
|
129669
129668
|
if (!entry) {
|
|
129670
129669
|
continue;
|
|
129671
129670
|
}
|
|
@@ -130259,6 +130258,7 @@ var ts;
|
|
|
130259
130258
|
symbolToSortTextIdMap: symbolToSortTextIdMap,
|
|
130260
130259
|
isTypeOnlyLocation: isTypeOnlyLocation,
|
|
130261
130260
|
isJsxIdentifierExpected: isJsxIdentifierExpected,
|
|
130261
|
+
isRightOfOpenTag: isRightOfOpenTag,
|
|
130262
130262
|
importCompletionNode: importCompletionNode,
|
|
130263
130263
|
hasUnresolvedAutoImports: hasUnresolvedAutoImports,
|
|
130264
130264
|
};
|
|
@@ -149510,10 +149510,15 @@ var ts;
|
|
|
149510
149510
|
if (a.kind !== 0 /* UseNamespace */ && b.kind !== 0 /* UseNamespace */) {
|
|
149511
149511
|
return ts.compareBooleans(allowsImportingSpecifier(b.moduleSpecifier), allowsImportingSpecifier(a.moduleSpecifier))
|
|
149512
149512
|
|| compareNodeCoreModuleSpecifiers(a.moduleSpecifier, b.moduleSpecifier, importingFile, program)
|
|
149513
|
+
|| ts.compareBooleans(isOnlyDotsAndSlashes(a.moduleSpecifier), isOnlyDotsAndSlashes(b.moduleSpecifier))
|
|
149513
149514
|
|| ts.compareNumberOfDirectorySeparators(a.moduleSpecifier, b.moduleSpecifier);
|
|
149514
149515
|
}
|
|
149515
149516
|
return 0 /* EqualTo */;
|
|
149516
149517
|
}
|
|
149518
|
+
var notDotOrSlashPattern = /[^.\/]/;
|
|
149519
|
+
function isOnlyDotsAndSlashes(path) {
|
|
149520
|
+
return !notDotOrSlashPattern.test(path);
|
|
149521
|
+
}
|
|
149517
149522
|
function compareNodeCoreModuleSpecifiers(a, b, importingFile, program) {
|
|
149518
149523
|
if (ts.startsWith(a, "node:") && !ts.startsWith(b, "node:"))
|
|
149519
149524
|
return ts.shouldUseUriStyleNodeCoreModules(importingFile, program) ? -1 /* LessThan */ : 1 /* GreaterThan */;
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220115";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -129724,7 +129724,7 @@ var ts;
|
|
|
129724
129724
|
return (location === null || location === void 0 ? void 0 : location.kind) === 79 /* Identifier */ ? ts.createTextSpanFromNode(location) : undefined;
|
|
129725
129725
|
}
|
|
129726
129726
|
function completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext) {
|
|
129727
|
-
var symbols = completionData.symbols, contextToken = completionData.contextToken, completionKind = completionData.completionKind, isInSnippetScope = completionData.isInSnippetScope, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, propertyAccessToConvert = completionData.propertyAccessToConvert, keywordFilters = completionData.keywordFilters, literals = completionData.literals, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, recommendedCompletion = completionData.recommendedCompletion, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation, isJsxIdentifierExpected = completionData.isJsxIdentifierExpected, importCompletionNode = completionData.importCompletionNode, insideJsDocTagTypeExpression = completionData.insideJsDocTagTypeExpression, symbolToSortTextIdMap = completionData.symbolToSortTextIdMap, hasUnresolvedAutoImports = completionData.hasUnresolvedAutoImports;
|
|
129727
|
+
var symbols = completionData.symbols, contextToken = completionData.contextToken, completionKind = completionData.completionKind, isInSnippetScope = completionData.isInSnippetScope, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, propertyAccessToConvert = completionData.propertyAccessToConvert, keywordFilters = completionData.keywordFilters, literals = completionData.literals, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, recommendedCompletion = completionData.recommendedCompletion, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation, isJsxIdentifierExpected = completionData.isJsxIdentifierExpected, isRightOfOpenTag = completionData.isRightOfOpenTag, importCompletionNode = completionData.importCompletionNode, insideJsDocTagTypeExpression = completionData.insideJsDocTagTypeExpression, symbolToSortTextIdMap = completionData.symbolToSortTextIdMap, hasUnresolvedAutoImports = completionData.hasUnresolvedAutoImports;
|
|
129728
129728
|
// Verify if the file is JSX language variant
|
|
129729
129729
|
if (ts.getLanguageVariant(sourceFile.scriptKind) === 1 /* JSX */) {
|
|
129730
129730
|
var completionInfo = getJsxClosingTagCompletion(location, sourceFile);
|
|
@@ -129735,7 +129735,7 @@ var ts;
|
|
|
129735
129735
|
var entries = ts.createSortedArray();
|
|
129736
129736
|
if (isUncheckedFile(sourceFile, compilerOptions)) {
|
|
129737
129737
|
var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries,
|
|
129738
|
-
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap);
|
|
129738
|
+
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag);
|
|
129739
129739
|
getJSCompletionEntries(sourceFile, location.pos, uniqueNames, ts.getEmitScriptTarget(compilerOptions), entries); // TODO: GH#18217
|
|
129740
129740
|
}
|
|
129741
129741
|
else {
|
|
@@ -129743,7 +129743,7 @@ var ts;
|
|
|
129743
129743
|
return undefined;
|
|
129744
129744
|
}
|
|
129745
129745
|
getCompletionEntriesFromSymbols(symbols, entries,
|
|
129746
|
-
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap);
|
|
129746
|
+
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag);
|
|
129747
129747
|
}
|
|
129748
129748
|
if (keywordFilters !== 0 /* None */) {
|
|
129749
129749
|
var entryNames = new ts.Set(entries.map(function (e) { return e.name; }));
|
|
@@ -129849,7 +129849,7 @@ var ts;
|
|
|
129849
129849
|
function createCompletionEntryForLiteral(sourceFile, preferences, literal) {
|
|
129850
129850
|
return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
|
|
129851
129851
|
}
|
|
129852
|
-
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, options, preferences, completionKind, formatContext) {
|
|
129852
|
+
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
129853
129853
|
var _a, _b;
|
|
129854
129854
|
var insertText;
|
|
129855
129855
|
var replacementSpan = ts.getReplacementSpanForContextToken(replacementToken);
|
|
@@ -129920,8 +129920,7 @@ var ts;
|
|
|
129920
129920
|
source = CompletionSource.ClassMemberSnippet;
|
|
129921
129921
|
}
|
|
129922
129922
|
}
|
|
129923
|
-
|
|
129924
|
-
if (kind === "JSX attribute" /* jsxAttribute */ && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none") {
|
|
129923
|
+
if (isJsxIdentifierExpected && !isRightOfOpenTag && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none") {
|
|
129925
129924
|
var useBraces_1 = preferences.jsxAttributeCompletionStyle === "braces";
|
|
129926
129925
|
var type = typeChecker.getTypeOfSymbolAtLocation(symbol, location);
|
|
129927
129926
|
// If is boolean like or undefined, don't return a snippet we want just to return the completion.
|
|
@@ -129959,7 +129958,7 @@ var ts;
|
|
|
129959
129958
|
// entries (like JavaScript identifier entries).
|
|
129960
129959
|
return {
|
|
129961
129960
|
name: name,
|
|
129962
|
-
kind:
|
|
129961
|
+
kind: ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
|
|
129963
129962
|
kindModifiers: ts.SymbolDisplay.getSymbolModifiers(typeChecker, symbol),
|
|
129964
129963
|
sortText: sortText,
|
|
129965
129964
|
source: source,
|
|
@@ -130255,7 +130254,7 @@ var ts;
|
|
|
130255
130254
|
return CompletionSource.ThisProperty;
|
|
130256
130255
|
}
|
|
130257
130256
|
}
|
|
130258
|
-
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap) {
|
|
130257
|
+
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
130259
130258
|
var _a;
|
|
130260
130259
|
var start = ts.timestamp();
|
|
130261
130260
|
var variableDeclaration = getVariableDeclaration(location);
|
|
@@ -130276,7 +130275,7 @@ var ts;
|
|
|
130276
130275
|
var name = info.name, needsConvertPropertyAccess = info.needsConvertPropertyAccess;
|
|
130277
130276
|
var sortTextId = (_a = symbolToSortTextIdMap === null || symbolToSortTextIdMap === void 0 ? void 0 : symbolToSortTextIdMap[ts.getSymbolId(symbol)]) !== null && _a !== void 0 ? _a : 11 /* LocationPriority */;
|
|
130278
130277
|
var sortText = (isDeprecated(symbol, typeChecker) ? 8 /* DeprecatedOffset */ + sortTextId : sortTextId).toString();
|
|
130279
|
-
var entry = createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, compilerOptions, preferences, kind, formatContext);
|
|
130278
|
+
var entry = createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, compilerOptions, preferences, kind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag);
|
|
130280
130279
|
if (!entry) {
|
|
130281
130280
|
continue;
|
|
130282
130281
|
}
|
|
@@ -130870,6 +130869,7 @@ var ts;
|
|
|
130870
130869
|
symbolToSortTextIdMap: symbolToSortTextIdMap,
|
|
130871
130870
|
isTypeOnlyLocation: isTypeOnlyLocation,
|
|
130872
130871
|
isJsxIdentifierExpected: isJsxIdentifierExpected,
|
|
130872
|
+
isRightOfOpenTag: isRightOfOpenTag,
|
|
130873
130873
|
importCompletionNode: importCompletionNode,
|
|
130874
130874
|
hasUnresolvedAutoImports: hasUnresolvedAutoImports,
|
|
130875
130875
|
};
|
|
@@ -150121,10 +150121,15 @@ var ts;
|
|
|
150121
150121
|
if (a.kind !== 0 /* UseNamespace */ && b.kind !== 0 /* UseNamespace */) {
|
|
150122
150122
|
return ts.compareBooleans(allowsImportingSpecifier(b.moduleSpecifier), allowsImportingSpecifier(a.moduleSpecifier))
|
|
150123
150123
|
|| compareNodeCoreModuleSpecifiers(a.moduleSpecifier, b.moduleSpecifier, importingFile, program)
|
|
150124
|
+
|| ts.compareBooleans(isOnlyDotsAndSlashes(a.moduleSpecifier), isOnlyDotsAndSlashes(b.moduleSpecifier))
|
|
150124
150125
|
|| ts.compareNumberOfDirectorySeparators(a.moduleSpecifier, b.moduleSpecifier);
|
|
150125
150126
|
}
|
|
150126
150127
|
return 0 /* EqualTo */;
|
|
150127
150128
|
}
|
|
150129
|
+
var notDotOrSlashPattern = /[^.\/]/;
|
|
150130
|
+
function isOnlyDotsAndSlashes(path) {
|
|
150131
|
+
return !notDotOrSlashPattern.test(path);
|
|
150132
|
+
}
|
|
150128
150133
|
function compareNodeCoreModuleSpecifiers(a, b, importingFile, program) {
|
|
150129
150134
|
if (ts.startsWith(a, "node:") && !ts.startsWith(b, "node:"))
|
|
150130
150135
|
return ts.shouldUseUriStyleNodeCoreModules(importingFile, program) ? -1 /* LessThan */ : 1 /* GreaterThan */;
|
package/lib/typescript.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220115";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -129724,7 +129724,7 @@ var ts;
|
|
|
129724
129724
|
return (location === null || location === void 0 ? void 0 : location.kind) === 79 /* Identifier */ ? ts.createTextSpanFromNode(location) : undefined;
|
|
129725
129725
|
}
|
|
129726
129726
|
function completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext) {
|
|
129727
|
-
var symbols = completionData.symbols, contextToken = completionData.contextToken, completionKind = completionData.completionKind, isInSnippetScope = completionData.isInSnippetScope, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, propertyAccessToConvert = completionData.propertyAccessToConvert, keywordFilters = completionData.keywordFilters, literals = completionData.literals, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, recommendedCompletion = completionData.recommendedCompletion, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation, isJsxIdentifierExpected = completionData.isJsxIdentifierExpected, importCompletionNode = completionData.importCompletionNode, insideJsDocTagTypeExpression = completionData.insideJsDocTagTypeExpression, symbolToSortTextIdMap = completionData.symbolToSortTextIdMap, hasUnresolvedAutoImports = completionData.hasUnresolvedAutoImports;
|
|
129727
|
+
var symbols = completionData.symbols, contextToken = completionData.contextToken, completionKind = completionData.completionKind, isInSnippetScope = completionData.isInSnippetScope, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, propertyAccessToConvert = completionData.propertyAccessToConvert, keywordFilters = completionData.keywordFilters, literals = completionData.literals, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, recommendedCompletion = completionData.recommendedCompletion, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation, isJsxIdentifierExpected = completionData.isJsxIdentifierExpected, isRightOfOpenTag = completionData.isRightOfOpenTag, importCompletionNode = completionData.importCompletionNode, insideJsDocTagTypeExpression = completionData.insideJsDocTagTypeExpression, symbolToSortTextIdMap = completionData.symbolToSortTextIdMap, hasUnresolvedAutoImports = completionData.hasUnresolvedAutoImports;
|
|
129728
129728
|
// Verify if the file is JSX language variant
|
|
129729
129729
|
if (ts.getLanguageVariant(sourceFile.scriptKind) === 1 /* JSX */) {
|
|
129730
129730
|
var completionInfo = getJsxClosingTagCompletion(location, sourceFile);
|
|
@@ -129735,7 +129735,7 @@ var ts;
|
|
|
129735
129735
|
var entries = ts.createSortedArray();
|
|
129736
129736
|
if (isUncheckedFile(sourceFile, compilerOptions)) {
|
|
129737
129737
|
var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries,
|
|
129738
|
-
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap);
|
|
129738
|
+
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag);
|
|
129739
129739
|
getJSCompletionEntries(sourceFile, location.pos, uniqueNames, ts.getEmitScriptTarget(compilerOptions), entries); // TODO: GH#18217
|
|
129740
129740
|
}
|
|
129741
129741
|
else {
|
|
@@ -129743,7 +129743,7 @@ var ts;
|
|
|
129743
129743
|
return undefined;
|
|
129744
129744
|
}
|
|
129745
129745
|
getCompletionEntriesFromSymbols(symbols, entries,
|
|
129746
|
-
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap);
|
|
129746
|
+
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag);
|
|
129747
129747
|
}
|
|
129748
129748
|
if (keywordFilters !== 0 /* None */) {
|
|
129749
129749
|
var entryNames = new ts.Set(entries.map(function (e) { return e.name; }));
|
|
@@ -129849,7 +129849,7 @@ var ts;
|
|
|
129849
129849
|
function createCompletionEntryForLiteral(sourceFile, preferences, literal) {
|
|
129850
129850
|
return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
|
|
129851
129851
|
}
|
|
129852
|
-
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, options, preferences, completionKind, formatContext) {
|
|
129852
|
+
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
129853
129853
|
var _a, _b;
|
|
129854
129854
|
var insertText;
|
|
129855
129855
|
var replacementSpan = ts.getReplacementSpanForContextToken(replacementToken);
|
|
@@ -129920,8 +129920,7 @@ var ts;
|
|
|
129920
129920
|
source = CompletionSource.ClassMemberSnippet;
|
|
129921
129921
|
}
|
|
129922
129922
|
}
|
|
129923
|
-
|
|
129924
|
-
if (kind === "JSX attribute" /* jsxAttribute */ && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none") {
|
|
129923
|
+
if (isJsxIdentifierExpected && !isRightOfOpenTag && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none") {
|
|
129925
129924
|
var useBraces_1 = preferences.jsxAttributeCompletionStyle === "braces";
|
|
129926
129925
|
var type = typeChecker.getTypeOfSymbolAtLocation(symbol, location);
|
|
129927
129926
|
// If is boolean like or undefined, don't return a snippet we want just to return the completion.
|
|
@@ -129959,7 +129958,7 @@ var ts;
|
|
|
129959
129958
|
// entries (like JavaScript identifier entries).
|
|
129960
129959
|
return {
|
|
129961
129960
|
name: name,
|
|
129962
|
-
kind:
|
|
129961
|
+
kind: ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
|
|
129963
129962
|
kindModifiers: ts.SymbolDisplay.getSymbolModifiers(typeChecker, symbol),
|
|
129964
129963
|
sortText: sortText,
|
|
129965
129964
|
source: source,
|
|
@@ -130255,7 +130254,7 @@ var ts;
|
|
|
130255
130254
|
return CompletionSource.ThisProperty;
|
|
130256
130255
|
}
|
|
130257
130256
|
}
|
|
130258
|
-
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap) {
|
|
130257
|
+
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
130259
130258
|
var _a;
|
|
130260
130259
|
var start = ts.timestamp();
|
|
130261
130260
|
var variableDeclaration = getVariableDeclaration(location);
|
|
@@ -130276,7 +130275,7 @@ var ts;
|
|
|
130276
130275
|
var name = info.name, needsConvertPropertyAccess = info.needsConvertPropertyAccess;
|
|
130277
130276
|
var sortTextId = (_a = symbolToSortTextIdMap === null || symbolToSortTextIdMap === void 0 ? void 0 : symbolToSortTextIdMap[ts.getSymbolId(symbol)]) !== null && _a !== void 0 ? _a : 11 /* LocationPriority */;
|
|
130278
130277
|
var sortText = (isDeprecated(symbol, typeChecker) ? 8 /* DeprecatedOffset */ + sortTextId : sortTextId).toString();
|
|
130279
|
-
var entry = createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, compilerOptions, preferences, kind, formatContext);
|
|
130278
|
+
var entry = createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, compilerOptions, preferences, kind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag);
|
|
130280
130279
|
if (!entry) {
|
|
130281
130280
|
continue;
|
|
130282
130281
|
}
|
|
@@ -130870,6 +130869,7 @@ var ts;
|
|
|
130870
130869
|
symbolToSortTextIdMap: symbolToSortTextIdMap,
|
|
130871
130870
|
isTypeOnlyLocation: isTypeOnlyLocation,
|
|
130872
130871
|
isJsxIdentifierExpected: isJsxIdentifierExpected,
|
|
130872
|
+
isRightOfOpenTag: isRightOfOpenTag,
|
|
130873
130873
|
importCompletionNode: importCompletionNode,
|
|
130874
130874
|
hasUnresolvedAutoImports: hasUnresolvedAutoImports,
|
|
130875
130875
|
};
|
|
@@ -150121,10 +150121,15 @@ var ts;
|
|
|
150121
150121
|
if (a.kind !== 0 /* UseNamespace */ && b.kind !== 0 /* UseNamespace */) {
|
|
150122
150122
|
return ts.compareBooleans(allowsImportingSpecifier(b.moduleSpecifier), allowsImportingSpecifier(a.moduleSpecifier))
|
|
150123
150123
|
|| compareNodeCoreModuleSpecifiers(a.moduleSpecifier, b.moduleSpecifier, importingFile, program)
|
|
150124
|
+
|| ts.compareBooleans(isOnlyDotsAndSlashes(a.moduleSpecifier), isOnlyDotsAndSlashes(b.moduleSpecifier))
|
|
150124
150125
|
|| ts.compareNumberOfDirectorySeparators(a.moduleSpecifier, b.moduleSpecifier);
|
|
150125
150126
|
}
|
|
150126
150127
|
return 0 /* EqualTo */;
|
|
150127
150128
|
}
|
|
150129
|
+
var notDotOrSlashPattern = /[^.\/]/;
|
|
150130
|
+
function isOnlyDotsAndSlashes(path) {
|
|
150131
|
+
return !notDotOrSlashPattern.test(path);
|
|
150132
|
+
}
|
|
150128
150133
|
function compareNodeCoreModuleSpecifiers(a, b, importingFile, program) {
|
|
150129
150134
|
if (ts.startsWith(a, "node:") && !ts.startsWith(b, "node:"))
|
|
150130
150135
|
return ts.shouldUseUriStyleNodeCoreModules(importingFile, program) ? -1 /* LessThan */ : 1 /* GreaterThan */;
|
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220115";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -129724,7 +129724,7 @@ var ts;
|
|
|
129724
129724
|
return (location === null || location === void 0 ? void 0 : location.kind) === 79 /* Identifier */ ? ts.createTextSpanFromNode(location) : undefined;
|
|
129725
129725
|
}
|
|
129726
129726
|
function completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext) {
|
|
129727
|
-
var symbols = completionData.symbols, contextToken = completionData.contextToken, completionKind = completionData.completionKind, isInSnippetScope = completionData.isInSnippetScope, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, propertyAccessToConvert = completionData.propertyAccessToConvert, keywordFilters = completionData.keywordFilters, literals = completionData.literals, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, recommendedCompletion = completionData.recommendedCompletion, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation, isJsxIdentifierExpected = completionData.isJsxIdentifierExpected, importCompletionNode = completionData.importCompletionNode, insideJsDocTagTypeExpression = completionData.insideJsDocTagTypeExpression, symbolToSortTextIdMap = completionData.symbolToSortTextIdMap, hasUnresolvedAutoImports = completionData.hasUnresolvedAutoImports;
|
|
129727
|
+
var symbols = completionData.symbols, contextToken = completionData.contextToken, completionKind = completionData.completionKind, isInSnippetScope = completionData.isInSnippetScope, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, propertyAccessToConvert = completionData.propertyAccessToConvert, keywordFilters = completionData.keywordFilters, literals = completionData.literals, symbolToOriginInfoMap = completionData.symbolToOriginInfoMap, recommendedCompletion = completionData.recommendedCompletion, isJsxInitializer = completionData.isJsxInitializer, isTypeOnlyLocation = completionData.isTypeOnlyLocation, isJsxIdentifierExpected = completionData.isJsxIdentifierExpected, isRightOfOpenTag = completionData.isRightOfOpenTag, importCompletionNode = completionData.importCompletionNode, insideJsDocTagTypeExpression = completionData.insideJsDocTagTypeExpression, symbolToSortTextIdMap = completionData.symbolToSortTextIdMap, hasUnresolvedAutoImports = completionData.hasUnresolvedAutoImports;
|
|
129728
129728
|
// Verify if the file is JSX language variant
|
|
129729
129729
|
if (ts.getLanguageVariant(sourceFile.scriptKind) === 1 /* JSX */) {
|
|
129730
129730
|
var completionInfo = getJsxClosingTagCompletion(location, sourceFile);
|
|
@@ -129735,7 +129735,7 @@ var ts;
|
|
|
129735
129735
|
var entries = ts.createSortedArray();
|
|
129736
129736
|
if (isUncheckedFile(sourceFile, compilerOptions)) {
|
|
129737
129737
|
var uniqueNames = getCompletionEntriesFromSymbols(symbols, entries,
|
|
129738
|
-
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap);
|
|
129738
|
+
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag);
|
|
129739
129739
|
getJSCompletionEntries(sourceFile, location.pos, uniqueNames, ts.getEmitScriptTarget(compilerOptions), entries); // TODO: GH#18217
|
|
129740
129740
|
}
|
|
129741
129741
|
else {
|
|
@@ -129743,7 +129743,7 @@ var ts;
|
|
|
129743
129743
|
return undefined;
|
|
129744
129744
|
}
|
|
129745
129745
|
getCompletionEntriesFromSymbols(symbols, entries,
|
|
129746
|
-
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap);
|
|
129746
|
+
/*replacementToken*/ undefined, contextToken, location, sourceFile, host, program, ts.getEmitScriptTarget(compilerOptions), log, completionKind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, isJsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag);
|
|
129747
129747
|
}
|
|
129748
129748
|
if (keywordFilters !== 0 /* None */) {
|
|
129749
129749
|
var entryNames = new ts.Set(entries.map(function (e) { return e.name; }));
|
|
@@ -129849,7 +129849,7 @@ var ts;
|
|
|
129849
129849
|
function createCompletionEntryForLiteral(sourceFile, preferences, literal) {
|
|
129850
129850
|
return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
|
|
129851
129851
|
}
|
|
129852
|
-
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, options, preferences, completionKind, formatContext) {
|
|
129852
|
+
function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
129853
129853
|
var _a, _b;
|
|
129854
129854
|
var insertText;
|
|
129855
129855
|
var replacementSpan = ts.getReplacementSpanForContextToken(replacementToken);
|
|
@@ -129920,8 +129920,7 @@ var ts;
|
|
|
129920
129920
|
source = CompletionSource.ClassMemberSnippet;
|
|
129921
129921
|
}
|
|
129922
129922
|
}
|
|
129923
|
-
|
|
129924
|
-
if (kind === "JSX attribute" /* jsxAttribute */ && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none") {
|
|
129923
|
+
if (isJsxIdentifierExpected && !isRightOfOpenTag && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none") {
|
|
129925
129924
|
var useBraces_1 = preferences.jsxAttributeCompletionStyle === "braces";
|
|
129926
129925
|
var type = typeChecker.getTypeOfSymbolAtLocation(symbol, location);
|
|
129927
129926
|
// If is boolean like or undefined, don't return a snippet we want just to return the completion.
|
|
@@ -129959,7 +129958,7 @@ var ts;
|
|
|
129959
129958
|
// entries (like JavaScript identifier entries).
|
|
129960
129959
|
return {
|
|
129961
129960
|
name: name,
|
|
129962
|
-
kind:
|
|
129961
|
+
kind: ts.SymbolDisplay.getSymbolKind(typeChecker, symbol, location),
|
|
129963
129962
|
kindModifiers: ts.SymbolDisplay.getSymbolModifiers(typeChecker, symbol),
|
|
129964
129963
|
sortText: sortText,
|
|
129965
129964
|
source: source,
|
|
@@ -130255,7 +130254,7 @@ var ts;
|
|
|
130255
130254
|
return CompletionSource.ThisProperty;
|
|
130256
130255
|
}
|
|
130257
130256
|
}
|
|
130258
|
-
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap) {
|
|
130257
|
+
function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importCompletionNode, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextIdMap, isJsxIdentifierExpected, isRightOfOpenTag) {
|
|
130259
130258
|
var _a;
|
|
130260
130259
|
var start = ts.timestamp();
|
|
130261
130260
|
var variableDeclaration = getVariableDeclaration(location);
|
|
@@ -130276,7 +130275,7 @@ var ts;
|
|
|
130276
130275
|
var name = info.name, needsConvertPropertyAccess = info.needsConvertPropertyAccess;
|
|
130277
130276
|
var sortTextId = (_a = symbolToSortTextIdMap === null || symbolToSortTextIdMap === void 0 ? void 0 : symbolToSortTextIdMap[ts.getSymbolId(symbol)]) !== null && _a !== void 0 ? _a : 11 /* LocationPriority */;
|
|
130278
130277
|
var sortText = (isDeprecated(symbol, typeChecker) ? 8 /* DeprecatedOffset */ + sortTextId : sortTextId).toString();
|
|
130279
|
-
var entry = createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, compilerOptions, preferences, kind, formatContext);
|
|
130278
|
+
var entry = createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importCompletionNode, useSemicolons, compilerOptions, preferences, kind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag);
|
|
130280
130279
|
if (!entry) {
|
|
130281
130280
|
continue;
|
|
130282
130281
|
}
|
|
@@ -130870,6 +130869,7 @@ var ts;
|
|
|
130870
130869
|
symbolToSortTextIdMap: symbolToSortTextIdMap,
|
|
130871
130870
|
isTypeOnlyLocation: isTypeOnlyLocation,
|
|
130872
130871
|
isJsxIdentifierExpected: isJsxIdentifierExpected,
|
|
130872
|
+
isRightOfOpenTag: isRightOfOpenTag,
|
|
130873
130873
|
importCompletionNode: importCompletionNode,
|
|
130874
130874
|
hasUnresolvedAutoImports: hasUnresolvedAutoImports,
|
|
130875
130875
|
};
|
|
@@ -150121,10 +150121,15 @@ var ts;
|
|
|
150121
150121
|
if (a.kind !== 0 /* UseNamespace */ && b.kind !== 0 /* UseNamespace */) {
|
|
150122
150122
|
return ts.compareBooleans(allowsImportingSpecifier(b.moduleSpecifier), allowsImportingSpecifier(a.moduleSpecifier))
|
|
150123
150123
|
|| compareNodeCoreModuleSpecifiers(a.moduleSpecifier, b.moduleSpecifier, importingFile, program)
|
|
150124
|
+
|| ts.compareBooleans(isOnlyDotsAndSlashes(a.moduleSpecifier), isOnlyDotsAndSlashes(b.moduleSpecifier))
|
|
150124
150125
|
|| ts.compareNumberOfDirectorySeparators(a.moduleSpecifier, b.moduleSpecifier);
|
|
150125
150126
|
}
|
|
150126
150127
|
return 0 /* EqualTo */;
|
|
150127
150128
|
}
|
|
150129
|
+
var notDotOrSlashPattern = /[^.\/]/;
|
|
150130
|
+
function isOnlyDotsAndSlashes(path) {
|
|
150131
|
+
return !notDotOrSlashPattern.test(path);
|
|
150132
|
+
}
|
|
150128
150133
|
function compareNodeCoreModuleSpecifiers(a, b, importingFile, program) {
|
|
150129
150134
|
if (ts.startsWith(a, "node:") && !ts.startsWith(b, "node:"))
|
|
150130
150135
|
return ts.shouldUseUriStyleNodeCoreModules(importingFile, program) ? -1 /* LessThan */ : 1 /* GreaterThan */;
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -89,7 +89,7 @@ var ts;
|
|
|
89
89
|
// The following is baselined as a literal template type without intervention
|
|
90
90
|
/** The version of the TypeScript compiler release */
|
|
91
91
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
92
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
92
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220115";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
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": "4.6.0-dev.
|
|
5
|
+
"version": "4.6.0-dev.20220115",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|