typescript 4.8.0-dev.20220525 → 4.8.0-dev.20220526
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/protocol.d.ts +1 -0
- package/lib/tsc.js +12 -7
- package/lib/tsserver.js +16 -7
- package/lib/tsserverlibrary.d.ts +2 -0
- package/lib/tsserverlibrary.js +16 -7
- package/lib/typescript.d.ts +1 -0
- package/lib/typescript.js +16 -7
- package/lib/typescriptServices.d.ts +1 -0
- package/lib/typescriptServices.js +16 -7
- package/lib/typingsInstaller.js +12 -7
- package/package.json +1 -1
package/lib/protocol.d.ts
CHANGED
|
@@ -2699,6 +2699,7 @@ declare namespace ts.server.protocol {
|
|
|
2699
2699
|
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
|
|
2700
2700
|
readonly includeInlayFunctionParameterTypeHints?: boolean;
|
|
2701
2701
|
readonly includeInlayVariableTypeHints?: boolean;
|
|
2702
|
+
readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean;
|
|
2702
2703
|
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
|
2703
2704
|
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
|
2704
2705
|
readonly includeInlayEnumMemberValueHints?: boolean;
|
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.8";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20220526";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -34266,7 +34266,7 @@ var ts;
|
|
|
34266
34266
|
}
|
|
34267
34267
|
if (ts.isImplicitGlob(spec.substring(spec.lastIndexOf(ts.directorySeparator) + 1))) {
|
|
34268
34268
|
return {
|
|
34269
|
-
key: useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec),
|
|
34269
|
+
key: ts.removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec)),
|
|
34270
34270
|
flags: 1
|
|
34271
34271
|
};
|
|
34272
34272
|
}
|
|
@@ -35199,15 +35199,19 @@ var ts;
|
|
|
35199
35199
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35200
35200
|
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
35201
35201
|
}
|
|
35202
|
-
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35203
|
-
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
35204
|
-
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
35205
|
-
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions, redirectedReference);
|
|
35206
|
-
}
|
|
35207
35202
|
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
35208
35203
|
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
35209
35204
|
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
35210
35205
|
var tsconfigExtensions = [Extensions.TSConfig];
|
|
35206
|
+
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35207
|
+
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
35208
|
+
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
35209
|
+
var extensions = compilerOptions.noDtsResolution ? [Extensions.TsOnly, Extensions.JavaScript] : tsExtensions;
|
|
35210
|
+
if (compilerOptions.resolveJsonModule) {
|
|
35211
|
+
extensions = __spreadArray(__spreadArray([], extensions, true), [Extensions.Json], false);
|
|
35212
|
+
}
|
|
35213
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference);
|
|
35214
|
+
}
|
|
35211
35215
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
35212
35216
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, undefined, jsOnlyExtensions, undefined);
|
|
35213
35217
|
}
|
|
@@ -102345,6 +102349,7 @@ var ts;
|
|
|
102345
102349
|
}
|
|
102346
102350
|
function reloadFileNamesFromConfigFile() {
|
|
102347
102351
|
writeLog("Reloading new file names and options");
|
|
102352
|
+
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
102348
102353
|
rootFileNames = ts.getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
102349
102354
|
if (ts.updateErrorForNoInputFiles(rootFileNames, ts.getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
102350
102355
|
hasChangedConfigFileParsingErrors = true;
|
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.20220526";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -42043,7 +42043,7 @@ var ts;
|
|
|
42043
42043
|
}
|
|
42044
42044
|
if (ts.isImplicitGlob(spec.substring(spec.lastIndexOf(ts.directorySeparator) + 1))) {
|
|
42045
42045
|
return {
|
|
42046
|
-
key: useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec),
|
|
42046
|
+
key: ts.removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec)),
|
|
42047
42047
|
flags: 1 /* Recursive */
|
|
42048
42048
|
};
|
|
42049
42049
|
}
|
|
@@ -43148,16 +43148,20 @@ var ts;
|
|
|
43148
43148
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43149
43149
|
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
43150
43150
|
}
|
|
43151
|
+
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
43152
|
+
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
43153
|
+
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
43154
|
+
var tsconfigExtensions = [Extensions.TSConfig];
|
|
43151
43155
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43152
43156
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
43153
43157
|
// es module file or cjs-like input file, use a variant of the legacy cjs resolver that supports the selected modern features
|
|
43154
43158
|
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
43155
|
-
|
|
43159
|
+
var extensions = compilerOptions.noDtsResolution ? [Extensions.TsOnly, Extensions.JavaScript] : tsExtensions;
|
|
43160
|
+
if (compilerOptions.resolveJsonModule) {
|
|
43161
|
+
extensions = __spreadArray(__spreadArray([], extensions, true), [Extensions.Json], false);
|
|
43162
|
+
}
|
|
43163
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference);
|
|
43156
43164
|
}
|
|
43157
|
-
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
43158
|
-
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
43159
|
-
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
43160
|
-
var tsconfigExtensions = [Extensions.TSConfig];
|
|
43161
43165
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
43162
43166
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, /*cache*/ undefined, jsOnlyExtensions, /*redirectedReferences*/ undefined);
|
|
43163
43167
|
}
|
|
@@ -123647,6 +123651,7 @@ var ts;
|
|
|
123647
123651
|
}
|
|
123648
123652
|
function reloadFileNamesFromConfigFile() {
|
|
123649
123653
|
writeLog("Reloading new file names and options");
|
|
123654
|
+
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
123650
123655
|
rootFileNames = ts.getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
123651
123656
|
if (ts.updateErrorForNoInputFiles(rootFileNames, ts.getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
123652
123657
|
hasChangedConfigFileParsingErrors = true;
|
|
@@ -143965,6 +143970,10 @@ var ts;
|
|
|
143965
143970
|
}
|
|
143966
143971
|
var typeDisplayString = printTypeInSingleLine(declarationType);
|
|
143967
143972
|
if (typeDisplayString) {
|
|
143973
|
+
var isVariableNameMatchesType = preferences.includeInlayVariableTypeHintsWhenTypeMatchesName === false && ts.equateStringsCaseInsensitive(decl.name.getText(), typeDisplayString);
|
|
143974
|
+
if (isVariableNameMatchesType) {
|
|
143975
|
+
return;
|
|
143976
|
+
}
|
|
143968
143977
|
addTypeHints(typeDisplayString, decl.name.end);
|
|
143969
143978
|
}
|
|
143970
143979
|
}
|
package/lib/tsserverlibrary.d.ts
CHANGED
|
@@ -4120,6 +4120,7 @@ declare namespace ts {
|
|
|
4120
4120
|
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
|
|
4121
4121
|
readonly includeInlayFunctionParameterTypeHints?: boolean;
|
|
4122
4122
|
readonly includeInlayVariableTypeHints?: boolean;
|
|
4123
|
+
readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean;
|
|
4123
4124
|
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
|
4124
4125
|
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
|
4125
4126
|
readonly includeInlayEnumMemberValueHints?: boolean;
|
|
@@ -9711,6 +9712,7 @@ declare namespace ts.server.protocol {
|
|
|
9711
9712
|
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
|
|
9712
9713
|
readonly includeInlayFunctionParameterTypeHints?: boolean;
|
|
9713
9714
|
readonly includeInlayVariableTypeHints?: boolean;
|
|
9715
|
+
readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean;
|
|
9714
9716
|
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
|
9715
9717
|
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
|
9716
9718
|
readonly includeInlayEnumMemberValueHints?: boolean;
|
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.20220526";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -42237,7 +42237,7 @@ var ts;
|
|
|
42237
42237
|
}
|
|
42238
42238
|
if (ts.isImplicitGlob(spec.substring(spec.lastIndexOf(ts.directorySeparator) + 1))) {
|
|
42239
42239
|
return {
|
|
42240
|
-
key: useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec),
|
|
42240
|
+
key: ts.removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec)),
|
|
42241
42241
|
flags: 1 /* Recursive */
|
|
42242
42242
|
};
|
|
42243
42243
|
}
|
|
@@ -43342,16 +43342,20 @@ var ts;
|
|
|
43342
43342
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43343
43343
|
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
43344
43344
|
}
|
|
43345
|
+
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
43346
|
+
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
43347
|
+
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
43348
|
+
var tsconfigExtensions = [Extensions.TSConfig];
|
|
43345
43349
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43346
43350
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
43347
43351
|
// es module file or cjs-like input file, use a variant of the legacy cjs resolver that supports the selected modern features
|
|
43348
43352
|
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
43349
|
-
|
|
43353
|
+
var extensions = compilerOptions.noDtsResolution ? [Extensions.TsOnly, Extensions.JavaScript] : tsExtensions;
|
|
43354
|
+
if (compilerOptions.resolveJsonModule) {
|
|
43355
|
+
extensions = __spreadArray(__spreadArray([], extensions, true), [Extensions.Json], false);
|
|
43356
|
+
}
|
|
43357
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference);
|
|
43350
43358
|
}
|
|
43351
|
-
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
43352
|
-
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
43353
|
-
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
43354
|
-
var tsconfigExtensions = [Extensions.TSConfig];
|
|
43355
43359
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
43356
43360
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, /*cache*/ undefined, jsOnlyExtensions, /*redirectedReferences*/ undefined);
|
|
43357
43361
|
}
|
|
@@ -123841,6 +123845,7 @@ var ts;
|
|
|
123841
123845
|
}
|
|
123842
123846
|
function reloadFileNamesFromConfigFile() {
|
|
123843
123847
|
writeLog("Reloading new file names and options");
|
|
123848
|
+
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
123844
123849
|
rootFileNames = ts.getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
123845
123850
|
if (ts.updateErrorForNoInputFiles(rootFileNames, ts.getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
123846
123851
|
hasChangedConfigFileParsingErrors = true;
|
|
@@ -144576,6 +144581,10 @@ var ts;
|
|
|
144576
144581
|
}
|
|
144577
144582
|
var typeDisplayString = printTypeInSingleLine(declarationType);
|
|
144578
144583
|
if (typeDisplayString) {
|
|
144584
|
+
var isVariableNameMatchesType = preferences.includeInlayVariableTypeHintsWhenTypeMatchesName === false && ts.equateStringsCaseInsensitive(decl.name.getText(), typeDisplayString);
|
|
144585
|
+
if (isVariableNameMatchesType) {
|
|
144586
|
+
return;
|
|
144587
|
+
}
|
|
144579
144588
|
addTypeHints(typeDisplayString, decl.name.end);
|
|
144580
144589
|
}
|
|
144581
144590
|
}
|
package/lib/typescript.d.ts
CHANGED
|
@@ -4120,6 +4120,7 @@ declare namespace ts {
|
|
|
4120
4120
|
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
|
|
4121
4121
|
readonly includeInlayFunctionParameterTypeHints?: boolean;
|
|
4122
4122
|
readonly includeInlayVariableTypeHints?: boolean;
|
|
4123
|
+
readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean;
|
|
4123
4124
|
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
|
4124
4125
|
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
|
4125
4126
|
readonly includeInlayEnumMemberValueHints?: boolean;
|
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.20220526";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -42237,7 +42237,7 @@ var ts;
|
|
|
42237
42237
|
}
|
|
42238
42238
|
if (ts.isImplicitGlob(spec.substring(spec.lastIndexOf(ts.directorySeparator) + 1))) {
|
|
42239
42239
|
return {
|
|
42240
|
-
key: useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec),
|
|
42240
|
+
key: ts.removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec)),
|
|
42241
42241
|
flags: 1 /* Recursive */
|
|
42242
42242
|
};
|
|
42243
42243
|
}
|
|
@@ -43342,16 +43342,20 @@ var ts;
|
|
|
43342
43342
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43343
43343
|
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
43344
43344
|
}
|
|
43345
|
+
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
43346
|
+
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
43347
|
+
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
43348
|
+
var tsconfigExtensions = [Extensions.TSConfig];
|
|
43345
43349
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43346
43350
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
43347
43351
|
// es module file or cjs-like input file, use a variant of the legacy cjs resolver that supports the selected modern features
|
|
43348
43352
|
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
43349
|
-
|
|
43353
|
+
var extensions = compilerOptions.noDtsResolution ? [Extensions.TsOnly, Extensions.JavaScript] : tsExtensions;
|
|
43354
|
+
if (compilerOptions.resolveJsonModule) {
|
|
43355
|
+
extensions = __spreadArray(__spreadArray([], extensions, true), [Extensions.Json], false);
|
|
43356
|
+
}
|
|
43357
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference);
|
|
43350
43358
|
}
|
|
43351
|
-
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
43352
|
-
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
43353
|
-
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
43354
|
-
var tsconfigExtensions = [Extensions.TSConfig];
|
|
43355
43359
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
43356
43360
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, /*cache*/ undefined, jsOnlyExtensions, /*redirectedReferences*/ undefined);
|
|
43357
43361
|
}
|
|
@@ -123841,6 +123845,7 @@ var ts;
|
|
|
123841
123845
|
}
|
|
123842
123846
|
function reloadFileNamesFromConfigFile() {
|
|
123843
123847
|
writeLog("Reloading new file names and options");
|
|
123848
|
+
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
123844
123849
|
rootFileNames = ts.getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
123845
123850
|
if (ts.updateErrorForNoInputFiles(rootFileNames, ts.getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
123846
123851
|
hasChangedConfigFileParsingErrors = true;
|
|
@@ -144576,6 +144581,10 @@ var ts;
|
|
|
144576
144581
|
}
|
|
144577
144582
|
var typeDisplayString = printTypeInSingleLine(declarationType);
|
|
144578
144583
|
if (typeDisplayString) {
|
|
144584
|
+
var isVariableNameMatchesType = preferences.includeInlayVariableTypeHintsWhenTypeMatchesName === false && ts.equateStringsCaseInsensitive(decl.name.getText(), typeDisplayString);
|
|
144585
|
+
if (isVariableNameMatchesType) {
|
|
144586
|
+
return;
|
|
144587
|
+
}
|
|
144579
144588
|
addTypeHints(typeDisplayString, decl.name.end);
|
|
144580
144589
|
}
|
|
144581
144590
|
}
|
|
@@ -4120,6 +4120,7 @@ declare namespace ts {
|
|
|
4120
4120
|
readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
|
|
4121
4121
|
readonly includeInlayFunctionParameterTypeHints?: boolean;
|
|
4122
4122
|
readonly includeInlayVariableTypeHints?: boolean;
|
|
4123
|
+
readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean;
|
|
4123
4124
|
readonly includeInlayPropertyDeclarationTypeHints?: boolean;
|
|
4124
4125
|
readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
|
|
4125
4126
|
readonly includeInlayEnumMemberValueHints?: boolean;
|
|
@@ -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.20220526";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -42237,7 +42237,7 @@ var ts;
|
|
|
42237
42237
|
}
|
|
42238
42238
|
if (ts.isImplicitGlob(spec.substring(spec.lastIndexOf(ts.directorySeparator) + 1))) {
|
|
42239
42239
|
return {
|
|
42240
|
-
key: useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec),
|
|
42240
|
+
key: ts.removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec)),
|
|
42241
42241
|
flags: 1 /* Recursive */
|
|
42242
42242
|
};
|
|
42243
42243
|
}
|
|
@@ -43342,16 +43342,20 @@ var ts;
|
|
|
43342
43342
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43343
43343
|
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
43344
43344
|
}
|
|
43345
|
+
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
43346
|
+
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
43347
|
+
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
43348
|
+
var tsconfigExtensions = [Extensions.TSConfig];
|
|
43345
43349
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43346
43350
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
43347
43351
|
// es module file or cjs-like input file, use a variant of the legacy cjs resolver that supports the selected modern features
|
|
43348
43352
|
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
43349
|
-
|
|
43353
|
+
var extensions = compilerOptions.noDtsResolution ? [Extensions.TsOnly, Extensions.JavaScript] : tsExtensions;
|
|
43354
|
+
if (compilerOptions.resolveJsonModule) {
|
|
43355
|
+
extensions = __spreadArray(__spreadArray([], extensions, true), [Extensions.Json], false);
|
|
43356
|
+
}
|
|
43357
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference);
|
|
43350
43358
|
}
|
|
43351
|
-
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
43352
|
-
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
43353
|
-
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
43354
|
-
var tsconfigExtensions = [Extensions.TSConfig];
|
|
43355
43359
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
43356
43360
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, /*cache*/ undefined, jsOnlyExtensions, /*redirectedReferences*/ undefined);
|
|
43357
43361
|
}
|
|
@@ -123841,6 +123845,7 @@ var ts;
|
|
|
123841
123845
|
}
|
|
123842
123846
|
function reloadFileNamesFromConfigFile() {
|
|
123843
123847
|
writeLog("Reloading new file names and options");
|
|
123848
|
+
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
123844
123849
|
rootFileNames = ts.getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
123845
123850
|
if (ts.updateErrorForNoInputFiles(rootFileNames, ts.getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
123846
123851
|
hasChangedConfigFileParsingErrors = true;
|
|
@@ -144576,6 +144581,10 @@ var ts;
|
|
|
144576
144581
|
}
|
|
144577
144582
|
var typeDisplayString = printTypeInSingleLine(declarationType);
|
|
144578
144583
|
if (typeDisplayString) {
|
|
144584
|
+
var isVariableNameMatchesType = preferences.includeInlayVariableTypeHintsWhenTypeMatchesName === false && ts.equateStringsCaseInsensitive(decl.name.getText(), typeDisplayString);
|
|
144585
|
+
if (isVariableNameMatchesType) {
|
|
144586
|
+
return;
|
|
144587
|
+
}
|
|
144579
144588
|
addTypeHints(typeDisplayString, decl.name.end);
|
|
144580
144589
|
}
|
|
144581
144590
|
}
|
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.20220526";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -42032,7 +42032,7 @@ var ts;
|
|
|
42032
42032
|
}
|
|
42033
42033
|
if (ts.isImplicitGlob(spec.substring(spec.lastIndexOf(ts.directorySeparator) + 1))) {
|
|
42034
42034
|
return {
|
|
42035
|
-
key: useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec),
|
|
42035
|
+
key: ts.removeTrailingDirectorySeparator(useCaseSensitiveFileNames ? spec : ts.toFileNameLowerCase(spec)),
|
|
42036
42036
|
flags: 1 /* Recursive */
|
|
42037
42037
|
};
|
|
42038
42038
|
}
|
|
@@ -43137,16 +43137,20 @@ var ts;
|
|
|
43137
43137
|
function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43138
43138
|
return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
|
|
43139
43139
|
}
|
|
43140
|
+
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
43141
|
+
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
43142
|
+
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
43143
|
+
var tsconfigExtensions = [Extensions.TSConfig];
|
|
43140
43144
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43141
43145
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
43142
43146
|
// es module file or cjs-like input file, use a variant of the legacy cjs resolver that supports the selected modern features
|
|
43143
43147
|
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
43144
|
-
|
|
43148
|
+
var extensions = compilerOptions.noDtsResolution ? [Extensions.TsOnly, Extensions.JavaScript] : tsExtensions;
|
|
43149
|
+
if (compilerOptions.resolveJsonModule) {
|
|
43150
|
+
extensions = __spreadArray(__spreadArray([], extensions, true), [Extensions.Json], false);
|
|
43151
|
+
}
|
|
43152
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference);
|
|
43145
43153
|
}
|
|
43146
|
-
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
43147
|
-
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
43148
|
-
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
43149
|
-
var tsconfigExtensions = [Extensions.TSConfig];
|
|
43150
43154
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
43151
43155
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, /*cache*/ undefined, jsOnlyExtensions, /*redirectedReferences*/ undefined);
|
|
43152
43156
|
}
|
|
@@ -123636,6 +123640,7 @@ var ts;
|
|
|
123636
123640
|
}
|
|
123637
123641
|
function reloadFileNamesFromConfigFile() {
|
|
123638
123642
|
writeLog("Reloading new file names and options");
|
|
123643
|
+
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
123639
123644
|
rootFileNames = ts.getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
123640
123645
|
if (ts.updateErrorForNoInputFiles(rootFileNames, ts.getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
123641
123646
|
hasChangedConfigFileParsingErrors = true;
|
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.8.0-dev.
|
|
5
|
+
"version": "4.8.0-dev.20220526",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|