@typescript-deploys/pr-build 4.8.0-pr-49233-9 → 4.8.0-pr-49245-7
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 +11 -10
- package/lib/tsserver.js +13 -10
- package/lib/tsserverlibrary.js +13 -10
- package/lib/typescript.js +13 -10
- package/lib/typescriptServices.js +13 -10
- package/lib/typingsInstaller.js +13 -10
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -35199,19 +35199,15 @@ 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
|
-
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
35203
|
-
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
35204
|
-
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
35205
|
-
var tsconfigExtensions = [Extensions.TSConfig];
|
|
35206
35202
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
35207
35203
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
35208
35204
|
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
35209
|
-
|
|
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);
|
|
35205
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions, redirectedReference);
|
|
35214
35206
|
}
|
|
35207
|
+
var jsOnlyExtensions = [Extensions.JavaScript];
|
|
35208
|
+
var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
|
|
35209
|
+
var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
|
|
35210
|
+
var tsconfigExtensions = [Extensions.TSConfig];
|
|
35215
35211
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
35216
35212
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, undefined, jsOnlyExtensions, undefined);
|
|
35217
35213
|
}
|
|
@@ -65620,6 +65616,11 @@ var ts;
|
|
|
65620
65616
|
ts.every(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
|
|
65621
65617
|
isTypeAssignableToKind(source, kind, strict);
|
|
65622
65618
|
}
|
|
65619
|
+
function anyTypesAssignableToKind(source, kind, strict) {
|
|
65620
|
+
return source.flags & 1048576 ?
|
|
65621
|
+
ts.some(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
|
|
65622
|
+
isTypeAssignableToKind(source, kind, strict);
|
|
65623
|
+
}
|
|
65623
65624
|
function isConstEnumObjectType(type) {
|
|
65624
65625
|
return !!(ts.getObjectFlags(type) & 16) && !!type.symbol && isConstEnumSymbol(type.symbol);
|
|
65625
65626
|
}
|
|
@@ -69382,7 +69383,7 @@ var ts;
|
|
|
69382
69383
|
checkReferenceExpression(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access);
|
|
69383
69384
|
}
|
|
69384
69385
|
}
|
|
69385
|
-
if (rightType
|
|
69386
|
+
if (!isTypeAny(rightType) && !(rightType.flags & 98304) && anyTypesAssignableToKind(getBaseConstraintOrType(rightType), (131068 | 131072) & ~98304)) {
|
|
69386
69387
|
error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType));
|
|
69387
69388
|
}
|
|
69388
69389
|
checkSourceElement(node.statement);
|
package/lib/tsserver.js
CHANGED
|
@@ -43148,20 +43148,16 @@ 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];
|
|
43155
43151
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43156
43152
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
43157
43153
|
// es module file or cjs-like input file, use a variant of the legacy cjs resolver that supports the selected modern features
|
|
43158
43154
|
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
43159
|
-
|
|
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);
|
|
43155
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions, redirectedReference);
|
|
43164
43156
|
}
|
|
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];
|
|
43165
43161
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
43166
43162
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, /*cache*/ undefined, jsOnlyExtensions, /*redirectedReferences*/ undefined);
|
|
43167
43163
|
}
|
|
@@ -78437,6 +78433,11 @@ var ts;
|
|
|
78437
78433
|
ts.every(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
|
|
78438
78434
|
isTypeAssignableToKind(source, kind, strict);
|
|
78439
78435
|
}
|
|
78436
|
+
function anyTypesAssignableToKind(source, kind, strict) {
|
|
78437
|
+
return source.flags & 1048576 /* Union */ ?
|
|
78438
|
+
ts.some(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
|
|
78439
|
+
isTypeAssignableToKind(source, kind, strict);
|
|
78440
|
+
}
|
|
78440
78441
|
function isConstEnumObjectType(type) {
|
|
78441
78442
|
return !!(ts.getObjectFlags(type) & 16 /* Anonymous */) && !!type.symbol && isConstEnumSymbol(type.symbol);
|
|
78442
78443
|
}
|
|
@@ -82817,7 +82818,9 @@ var ts;
|
|
|
82817
82818
|
}
|
|
82818
82819
|
// unknownType is returned i.e. if node.expression is identifier whose name cannot be resolved
|
|
82819
82820
|
// in this case error about missing name is already reported - do not report extra one
|
|
82820
|
-
|
|
82821
|
+
// TypeFlags.Nullable must be explicitly checked for in rightType for this check for non-strict modes, where
|
|
82822
|
+
// `getNonNullableTypeIfNeeded` is a noop (and the nullable types as any-ish).
|
|
82823
|
+
if (!isTypeAny(rightType) && !(rightType.flags & 98304 /* Nullable */) && anyTypesAssignableToKind(getBaseConstraintOrType(rightType), (131068 /* Primitive */ | 131072 /* Never */) & ~98304 /* Nullable */)) {
|
|
82821
82824
|
error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType));
|
|
82822
82825
|
}
|
|
82823
82826
|
checkSourceElement(node.statement);
|
package/lib/tsserverlibrary.js
CHANGED
|
@@ -43342,20 +43342,16 @@ 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];
|
|
43349
43345
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43350
43346
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
43351
43347
|
// es module file or cjs-like input file, use a variant of the legacy cjs resolver that supports the selected modern features
|
|
43352
43348
|
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
43353
|
-
|
|
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);
|
|
43349
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions, redirectedReference);
|
|
43358
43350
|
}
|
|
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];
|
|
43359
43355
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
43360
43356
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, /*cache*/ undefined, jsOnlyExtensions, /*redirectedReferences*/ undefined);
|
|
43361
43357
|
}
|
|
@@ -78631,6 +78627,11 @@ var ts;
|
|
|
78631
78627
|
ts.every(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
|
|
78632
78628
|
isTypeAssignableToKind(source, kind, strict);
|
|
78633
78629
|
}
|
|
78630
|
+
function anyTypesAssignableToKind(source, kind, strict) {
|
|
78631
|
+
return source.flags & 1048576 /* Union */ ?
|
|
78632
|
+
ts.some(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
|
|
78633
|
+
isTypeAssignableToKind(source, kind, strict);
|
|
78634
|
+
}
|
|
78634
78635
|
function isConstEnumObjectType(type) {
|
|
78635
78636
|
return !!(ts.getObjectFlags(type) & 16 /* Anonymous */) && !!type.symbol && isConstEnumSymbol(type.symbol);
|
|
78636
78637
|
}
|
|
@@ -83011,7 +83012,9 @@ var ts;
|
|
|
83011
83012
|
}
|
|
83012
83013
|
// unknownType is returned i.e. if node.expression is identifier whose name cannot be resolved
|
|
83013
83014
|
// in this case error about missing name is already reported - do not report extra one
|
|
83014
|
-
|
|
83015
|
+
// TypeFlags.Nullable must be explicitly checked for in rightType for this check for non-strict modes, where
|
|
83016
|
+
// `getNonNullableTypeIfNeeded` is a noop (and the nullable types as any-ish).
|
|
83017
|
+
if (!isTypeAny(rightType) && !(rightType.flags & 98304 /* Nullable */) && anyTypesAssignableToKind(getBaseConstraintOrType(rightType), (131068 /* Primitive */ | 131072 /* Never */) & ~98304 /* Nullable */)) {
|
|
83015
83018
|
error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType));
|
|
83016
83019
|
}
|
|
83017
83020
|
checkSourceElement(node.statement);
|
package/lib/typescript.js
CHANGED
|
@@ -43342,20 +43342,16 @@ 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];
|
|
43349
43345
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43350
43346
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
43351
43347
|
// es module file or cjs-like input file, use a variant of the legacy cjs resolver that supports the selected modern features
|
|
43352
43348
|
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
43353
|
-
|
|
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);
|
|
43349
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions, redirectedReference);
|
|
43358
43350
|
}
|
|
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];
|
|
43359
43355
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
43360
43356
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, /*cache*/ undefined, jsOnlyExtensions, /*redirectedReferences*/ undefined);
|
|
43361
43357
|
}
|
|
@@ -78631,6 +78627,11 @@ var ts;
|
|
|
78631
78627
|
ts.every(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
|
|
78632
78628
|
isTypeAssignableToKind(source, kind, strict);
|
|
78633
78629
|
}
|
|
78630
|
+
function anyTypesAssignableToKind(source, kind, strict) {
|
|
78631
|
+
return source.flags & 1048576 /* Union */ ?
|
|
78632
|
+
ts.some(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
|
|
78633
|
+
isTypeAssignableToKind(source, kind, strict);
|
|
78634
|
+
}
|
|
78634
78635
|
function isConstEnumObjectType(type) {
|
|
78635
78636
|
return !!(ts.getObjectFlags(type) & 16 /* Anonymous */) && !!type.symbol && isConstEnumSymbol(type.symbol);
|
|
78636
78637
|
}
|
|
@@ -83011,7 +83012,9 @@ var ts;
|
|
|
83011
83012
|
}
|
|
83012
83013
|
// unknownType is returned i.e. if node.expression is identifier whose name cannot be resolved
|
|
83013
83014
|
// in this case error about missing name is already reported - do not report extra one
|
|
83014
|
-
|
|
83015
|
+
// TypeFlags.Nullable must be explicitly checked for in rightType for this check for non-strict modes, where
|
|
83016
|
+
// `getNonNullableTypeIfNeeded` is a noop (and the nullable types as any-ish).
|
|
83017
|
+
if (!isTypeAny(rightType) && !(rightType.flags & 98304 /* Nullable */) && anyTypesAssignableToKind(getBaseConstraintOrType(rightType), (131068 /* Primitive */ | 131072 /* Never */) & ~98304 /* Nullable */)) {
|
|
83015
83018
|
error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType));
|
|
83016
83019
|
}
|
|
83017
83020
|
checkSourceElement(node.statement);
|
|
@@ -43342,20 +43342,16 @@ 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];
|
|
43349
43345
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43350
43346
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
43351
43347
|
// es module file or cjs-like input file, use a variant of the legacy cjs resolver that supports the selected modern features
|
|
43352
43348
|
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
43353
|
-
|
|
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);
|
|
43349
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions, redirectedReference);
|
|
43358
43350
|
}
|
|
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];
|
|
43359
43355
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
43360
43356
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, /*cache*/ undefined, jsOnlyExtensions, /*redirectedReferences*/ undefined);
|
|
43361
43357
|
}
|
|
@@ -78631,6 +78627,11 @@ var ts;
|
|
|
78631
78627
|
ts.every(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
|
|
78632
78628
|
isTypeAssignableToKind(source, kind, strict);
|
|
78633
78629
|
}
|
|
78630
|
+
function anyTypesAssignableToKind(source, kind, strict) {
|
|
78631
|
+
return source.flags & 1048576 /* Union */ ?
|
|
78632
|
+
ts.some(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
|
|
78633
|
+
isTypeAssignableToKind(source, kind, strict);
|
|
78634
|
+
}
|
|
78634
78635
|
function isConstEnumObjectType(type) {
|
|
78635
78636
|
return !!(ts.getObjectFlags(type) & 16 /* Anonymous */) && !!type.symbol && isConstEnumSymbol(type.symbol);
|
|
78636
78637
|
}
|
|
@@ -83011,7 +83012,9 @@ var ts;
|
|
|
83011
83012
|
}
|
|
83012
83013
|
// unknownType is returned i.e. if node.expression is identifier whose name cannot be resolved
|
|
83013
83014
|
// in this case error about missing name is already reported - do not report extra one
|
|
83014
|
-
|
|
83015
|
+
// TypeFlags.Nullable must be explicitly checked for in rightType for this check for non-strict modes, where
|
|
83016
|
+
// `getNonNullableTypeIfNeeded` is a noop (and the nullable types as any-ish).
|
|
83017
|
+
if (!isTypeAny(rightType) && !(rightType.flags & 98304 /* Nullable */) && anyTypesAssignableToKind(getBaseConstraintOrType(rightType), (131068 /* Primitive */ | 131072 /* Never */) & ~98304 /* Nullable */)) {
|
|
83015
83018
|
error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType));
|
|
83016
83019
|
}
|
|
83017
83020
|
checkSourceElement(node.statement);
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -43137,20 +43137,16 @@ 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];
|
|
43144
43140
|
function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
|
|
43145
43141
|
var containingDirectory = ts.getDirectoryPath(containingFile);
|
|
43146
43142
|
// es module file or cjs-like input file, use a variant of the legacy cjs resolver that supports the selected modern features
|
|
43147
43143
|
var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
|
|
43148
|
-
|
|
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);
|
|
43144
|
+
return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions, redirectedReference);
|
|
43153
43145
|
}
|
|
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];
|
|
43154
43150
|
function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
43155
43151
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, /*cache*/ undefined, jsOnlyExtensions, /*redirectedReferences*/ undefined);
|
|
43156
43152
|
}
|
|
@@ -78426,6 +78422,11 @@ var ts;
|
|
|
78426
78422
|
ts.every(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
|
|
78427
78423
|
isTypeAssignableToKind(source, kind, strict);
|
|
78428
78424
|
}
|
|
78425
|
+
function anyTypesAssignableToKind(source, kind, strict) {
|
|
78426
|
+
return source.flags & 1048576 /* Union */ ?
|
|
78427
|
+
ts.some(source.types, function (subType) { return allTypesAssignableToKind(subType, kind, strict); }) :
|
|
78428
|
+
isTypeAssignableToKind(source, kind, strict);
|
|
78429
|
+
}
|
|
78429
78430
|
function isConstEnumObjectType(type) {
|
|
78430
78431
|
return !!(ts.getObjectFlags(type) & 16 /* Anonymous */) && !!type.symbol && isConstEnumSymbol(type.symbol);
|
|
78431
78432
|
}
|
|
@@ -82806,7 +82807,9 @@ var ts;
|
|
|
82806
82807
|
}
|
|
82807
82808
|
// unknownType is returned i.e. if node.expression is identifier whose name cannot be resolved
|
|
82808
82809
|
// in this case error about missing name is already reported - do not report extra one
|
|
82809
|
-
|
|
82810
|
+
// TypeFlags.Nullable must be explicitly checked for in rightType for this check for non-strict modes, where
|
|
82811
|
+
// `getNonNullableTypeIfNeeded` is a noop (and the nullable types as any-ish).
|
|
82812
|
+
if (!isTypeAny(rightType) && !(rightType.flags & 98304 /* Nullable */) && anyTypesAssignableToKind(getBaseConstraintOrType(rightType), (131068 /* Primitive */ | 131072 /* Never */) & ~98304 /* Nullable */)) {
|
|
82810
82813
|
error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, typeToString(rightType));
|
|
82811
82814
|
}
|
|
82812
82815
|
checkSourceElement(node.statement);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "4.8.0-pr-
|
|
5
|
+
"version": "4.8.0-pr-49245-7",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|