mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Bump version to 5.0.2 and LKG
This commit is contained in:
+134
-123
@@ -23,7 +23,7 @@ var __export = (target, all) => {
|
||||
|
||||
// src/compiler/corePublic.ts
|
||||
var versionMajorMinor = "5.0";
|
||||
var version = `${versionMajorMinor}.1-rc`;
|
||||
var version = "5.0.2";
|
||||
|
||||
// src/compiler/core.ts
|
||||
var emptyArray = [];
|
||||
@@ -3854,6 +3854,7 @@ function diagnosticCategoryName(d, lowerCase = true) {
|
||||
}
|
||||
var ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind2) => {
|
||||
ModuleResolutionKind2[ModuleResolutionKind2["Classic"] = 1] = "Classic";
|
||||
ModuleResolutionKind2[ModuleResolutionKind2["NodeJs"] = 2] = "NodeJs";
|
||||
ModuleResolutionKind2[ModuleResolutionKind2["Node10"] = 2] = "Node10";
|
||||
ModuleResolutionKind2[ModuleResolutionKind2["Node16"] = 3] = "Node16";
|
||||
ModuleResolutionKind2[ModuleResolutionKind2["NodeNext"] = 99] = "NodeNext";
|
||||
@@ -6894,12 +6895,14 @@ var Diagnostics = {
|
||||
Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),
|
||||
An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),
|
||||
Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),
|
||||
Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecat_5101", `Flag '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),
|
||||
Flag_0_is_deprecated_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Flag_0_is_deprecated_Please_remove_it_from_your_configuration_5102", "Flag '{0}' is deprecated. Please remove it from your configuration."),
|
||||
Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101", `Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),
|
||||
Option_0_has_been_removed_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102", "Option '{0}' has been removed. Please remove it from your configuration."),
|
||||
Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."),
|
||||
Option_0_is_redundant_and_cannot_be_specified_with_option_1: diag(5104, 1 /* Error */, "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104", "Option '{0}' is redundant and cannot be specified with option '{1}'."),
|
||||
Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System: diag(5105, 1 /* Error */, "Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105", "Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),
|
||||
Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."),
|
||||
Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`),
|
||||
Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."),
|
||||
Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."),
|
||||
Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."),
|
||||
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
||||
@@ -58167,6 +58170,9 @@ function createTypeChecker(host) {
|
||||
function isTypeSubtypeOf(source, target) {
|
||||
return isTypeRelatedTo(source, target, subtypeRelation);
|
||||
}
|
||||
function isTypeStrictSubtypeOf(source, target) {
|
||||
return isTypeRelatedTo(source, target, strictSubtypeRelation);
|
||||
}
|
||||
function isTypeAssignableTo(source, target) {
|
||||
return isTypeRelatedTo(source, target, assignableRelation);
|
||||
}
|
||||
@@ -60075,7 +60081,7 @@ function createTypeChecker(host) {
|
||||
0 /* None */
|
||||
);
|
||||
}
|
||||
} else if (result2 && isNonGenericObjectType(target2) && !isArrayOrTupleType(target2) && source2.flags & 2097152 /* Intersection */ && getApparentType(source2).flags & 3670016 /* StructuredType */ && !some(source2.types, (t) => !!(getObjectFlags(t) & 262144 /* NonInferrableType */))) {
|
||||
} else if (result2 && isNonGenericObjectType(target2) && !isArrayOrTupleType(target2) && source2.flags & 2097152 /* Intersection */ && getApparentType(source2).flags & 3670016 /* StructuredType */ && !some(source2.types, (t) => t === target2 || !!(getObjectFlags(t) & 262144 /* NonInferrableType */))) {
|
||||
result2 &= propertiesRelatedTo(
|
||||
source2,
|
||||
target2,
|
||||
@@ -65262,7 +65268,7 @@ function createTypeChecker(host) {
|
||||
const narrowedType = mapType(candidate, (c) => {
|
||||
const discriminant = keyPropertyName && getTypeOfPropertyOfType(c, keyPropertyName);
|
||||
const matching = discriminant && getConstituentTypeForKeyType(type, discriminant);
|
||||
const directlyRelated = mapType(matching || type, checkDerived ? (t) => isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : (t) => isTypeSubtypeOf(c, t) && !isTypeIdenticalTo(c, t) ? c : isTypeSubtypeOf(t, c) ? t : neverType);
|
||||
const directlyRelated = mapType(matching || type, checkDerived ? (t) => isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : (t) => isTypeStrictSubtypeOf(t, c) ? t : isTypeStrictSubtypeOf(c, t) ? c : isTypeSubtypeOf(t, c) ? t : isTypeSubtypeOf(c, t) ? c : neverType);
|
||||
return directlyRelated.flags & 131072 /* Never */ ? mapType(type, (t) => maybeTypeOfKind(t, 465829888 /* Instantiable */) && isRelated(c, getBaseConstraintOfType(t) || unknownType) ? getIntersectionType([t, c]) : neverType) : directlyRelated;
|
||||
});
|
||||
return !(narrowedType.flags & 131072 /* Never */) ? narrowedType : isTypeSubtypeOf(candidate, type) ? candidate : isTypeAssignableTo(type, candidate) ? type : isTypeAssignableTo(candidate, type) ? candidate : getIntersectionType([type, candidate]);
|
||||
@@ -112911,6 +112917,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
||||
const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions;
|
||||
const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion2 } = createProgramOptions;
|
||||
let { oldProgram } = createProgramOptions;
|
||||
const reportInvalidIgnoreDeprecations = memoize(() => createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations));
|
||||
let processingDefaultLibFiles;
|
||||
let processingOtherFiles;
|
||||
let files;
|
||||
@@ -115337,127 +115344,131 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
||||
}
|
||||
}
|
||||
}
|
||||
function getVersionForDeprecationDiagnostics(reportInvalidIgnoreDeprecations) {
|
||||
const version2 = typeScriptVersion2 || versionMajorMinor;
|
||||
function getIgnoreDeprecationsVersion() {
|
||||
const ignoreDeprecations = options.ignoreDeprecations;
|
||||
if (ignoreDeprecations) {
|
||||
if (ignoreDeprecations === "5.0" /* v5_0 */ && (version2 === "5.0" /* v5_0 */ || version2 === "5.5" /* v5_5 */)) {
|
||||
return;
|
||||
} else if (reportInvalidIgnoreDeprecations) {
|
||||
createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations);
|
||||
if (ignoreDeprecations === "5.0") {
|
||||
return new Version(ignoreDeprecations);
|
||||
}
|
||||
reportInvalidIgnoreDeprecations();
|
||||
}
|
||||
return Version.zero;
|
||||
}
|
||||
function checkDeprecations(deprecatedIn, removedIn, createDiagnostic, fn) {
|
||||
const deprecatedInVersion = new Version(deprecatedIn);
|
||||
const removedInVersion = new Version(removedIn);
|
||||
const typescriptVersion = new Version(typeScriptVersion2 || versionMajorMinor);
|
||||
const ignoreDeprecationsVersion = getIgnoreDeprecationsVersion();
|
||||
const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1 /* GreaterThan */);
|
||||
const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion.compareTo(deprecatedInVersion) === -1 /* LessThan */;
|
||||
if (mustBeRemoved || canBeSilenced) {
|
||||
fn((name, value, useInstead) => {
|
||||
if (mustBeRemoved) {
|
||||
if (value === void 0) {
|
||||
createDiagnostic(name, value, useInstead, Diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration, name);
|
||||
} else {
|
||||
createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, name, value);
|
||||
}
|
||||
} else {
|
||||
if (value === void 0) {
|
||||
createDiagnostic(name, value, useInstead, Diagnostics.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, name, removedIn, deprecatedIn);
|
||||
} else {
|
||||
createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, name, value, removedIn, deprecatedIn);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return version2;
|
||||
}
|
||||
function verifyDeprecatedCompilerOptions() {
|
||||
const version2 = getVersionForDeprecationDiagnostics(
|
||||
/*reportInvalidIgnoreDeprecations*/
|
||||
true
|
||||
);
|
||||
if (!version2)
|
||||
return;
|
||||
if (options.target === 0 /* ES3 */) {
|
||||
createDeprecatedDiagnosticForOption(version2, "target", "ES3");
|
||||
}
|
||||
if (options.noImplicitUseStrict) {
|
||||
createDeprecatedDiagnosticForOption(version2, "noImplicitUseStrict");
|
||||
}
|
||||
if (options.keyofStringsOnly) {
|
||||
createDeprecatedDiagnosticForOption(version2, "keyofStringsOnly");
|
||||
}
|
||||
if (options.suppressExcessPropertyErrors) {
|
||||
createDeprecatedDiagnosticForOption(version2, "suppressExcessPropertyErrors");
|
||||
}
|
||||
if (options.suppressImplicitAnyIndexErrors) {
|
||||
createDeprecatedDiagnosticForOption(version2, "suppressImplicitAnyIndexErrors");
|
||||
}
|
||||
if (options.noStrictGenericChecks) {
|
||||
createDeprecatedDiagnosticForOption(version2, "noStrictGenericChecks");
|
||||
}
|
||||
if (options.charset) {
|
||||
createDeprecatedDiagnosticForOption(version2, "charset");
|
||||
}
|
||||
if (options.out) {
|
||||
createDeprecatedDiagnosticForOption(version2, "out");
|
||||
}
|
||||
if (options.importsNotUsedAsValues) {
|
||||
createDeprecatedDiagnosticForOption(
|
||||
version2,
|
||||
"importsNotUsedAsValues",
|
||||
/*value*/
|
||||
void 0,
|
||||
"verbatimModuleSyntax"
|
||||
);
|
||||
}
|
||||
if (options.preserveValueImports) {
|
||||
createDeprecatedDiagnosticForOption(
|
||||
version2,
|
||||
"preserveValueImports",
|
||||
/*value*/
|
||||
void 0,
|
||||
"verbatimModuleSyntax"
|
||||
);
|
||||
}
|
||||
}
|
||||
function verifyDeprecatedProjectReference(ref, parentFile, index) {
|
||||
if (ref.prepend) {
|
||||
const version2 = getVersionForDeprecationDiagnostics(
|
||||
/*reportInvalidIgnoreDeprecations*/
|
||||
false
|
||||
);
|
||||
if (version2) {
|
||||
createDeprecatedOptionForVersionDiagnostic(
|
||||
version2,
|
||||
(message, arg0, arg1, arg2) => createDiagnosticForReference(parentFile, index, message, arg0, arg1, arg2),
|
||||
"prepend"
|
||||
function createDiagnostic(name, value, useInstead, message, arg0, arg1, arg2, arg3) {
|
||||
if (useInstead) {
|
||||
const details = chainDiagnosticMessages(
|
||||
/*details*/
|
||||
void 0,
|
||||
Diagnostics.Use_0_instead,
|
||||
useInstead
|
||||
);
|
||||
const chain = chainDiagnosticMessages(details, message, arg0, arg1, arg2, arg3);
|
||||
createDiagnosticForOption(
|
||||
/*onKey*/
|
||||
!value,
|
||||
name,
|
||||
/*option2*/
|
||||
void 0,
|
||||
chain
|
||||
);
|
||||
} else {
|
||||
createDiagnosticForOption(
|
||||
/*onKey*/
|
||||
!value,
|
||||
name,
|
||||
/*option2*/
|
||||
void 0,
|
||||
message,
|
||||
arg0,
|
||||
arg1,
|
||||
arg2,
|
||||
arg3
|
||||
);
|
||||
}
|
||||
}
|
||||
checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => {
|
||||
if (options.target === 0 /* ES3 */) {
|
||||
createDeprecatedDiagnostic("target", "ES3");
|
||||
}
|
||||
if (options.noImplicitUseStrict) {
|
||||
createDeprecatedDiagnostic("noImplicitUseStrict");
|
||||
}
|
||||
if (options.keyofStringsOnly) {
|
||||
createDeprecatedDiagnostic("keyofStringsOnly");
|
||||
}
|
||||
if (options.suppressExcessPropertyErrors) {
|
||||
createDeprecatedDiagnostic("suppressExcessPropertyErrors");
|
||||
}
|
||||
if (options.suppressImplicitAnyIndexErrors) {
|
||||
createDeprecatedDiagnostic("suppressImplicitAnyIndexErrors");
|
||||
}
|
||||
if (options.noStrictGenericChecks) {
|
||||
createDeprecatedDiagnostic("noStrictGenericChecks");
|
||||
}
|
||||
if (options.charset) {
|
||||
createDeprecatedDiagnostic("charset");
|
||||
}
|
||||
if (options.out) {
|
||||
createDeprecatedDiagnostic(
|
||||
"out",
|
||||
/*value*/
|
||||
void 0,
|
||||
"outFile"
|
||||
);
|
||||
}
|
||||
if (options.importsNotUsedAsValues) {
|
||||
createDeprecatedDiagnostic(
|
||||
"importsNotUsedAsValues",
|
||||
/*value*/
|
||||
void 0,
|
||||
"verbatimModuleSyntax"
|
||||
);
|
||||
}
|
||||
if (options.preserveValueImports) {
|
||||
createDeprecatedDiagnostic(
|
||||
"preserveValueImports",
|
||||
/*value*/
|
||||
void 0,
|
||||
"verbatimModuleSyntax"
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
function createDeprecatedDiagnosticForOption(version2, name, value, useInstead) {
|
||||
return createDeprecatedOptionForVersionDiagnostic(
|
||||
version2,
|
||||
(message, arg0, arg1, arg2) => {
|
||||
if (useInstead) {
|
||||
const details = chainDiagnosticMessages(
|
||||
/*details*/
|
||||
void 0,
|
||||
Diagnostics.Use_0_instead,
|
||||
useInstead
|
||||
);
|
||||
const chain = chainDiagnosticMessages(details, message, arg0, arg1, arg2);
|
||||
createDiagnosticForOption(
|
||||
/*onKey*/
|
||||
!value,
|
||||
name,
|
||||
/*option2*/
|
||||
void 0,
|
||||
chain
|
||||
);
|
||||
} else {
|
||||
createDiagnosticForOption(
|
||||
/*onKey*/
|
||||
!value,
|
||||
name,
|
||||
/*option2*/
|
||||
void 0,
|
||||
message,
|
||||
arg0,
|
||||
arg1,
|
||||
arg2
|
||||
);
|
||||
}
|
||||
},
|
||||
name,
|
||||
value
|
||||
);
|
||||
}
|
||||
function createDeprecatedOptionForVersionDiagnostic(version2, createDiagnostic, name, value) {
|
||||
if (version2 === "6.0" /* v6_0 */) {
|
||||
createDiagnostic(Diagnostics.Flag_0_is_deprecated_Please_remove_it_from_your_configuration, value || name);
|
||||
} else {
|
||||
createDiagnostic(Diagnostics.Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, value || name, "5.5" /* v5_5 */, "5.0" /* v5_0 */);
|
||||
function verifyDeprecatedProjectReference(ref, parentFile, index) {
|
||||
function createDiagnostic(_name, _value, _useInstead, message, arg0, arg1, arg2, arg3) {
|
||||
createDiagnosticForReference(parentFile, index, message, arg0, arg1, arg2, arg3);
|
||||
}
|
||||
checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => {
|
||||
if (ref.prepend) {
|
||||
createDeprecatedDiagnostic("prepend");
|
||||
}
|
||||
});
|
||||
}
|
||||
function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) {
|
||||
var _a3;
|
||||
@@ -115710,25 +115721,25 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
||||
arg1
|
||||
);
|
||||
}
|
||||
function createDiagnosticForReference(sourceFile, index, message, arg0, arg1, arg2) {
|
||||
function createDiagnosticForReference(sourceFile, index, message, arg0, arg1, arg2, arg3) {
|
||||
const referencesSyntax = firstDefined(
|
||||
getTsConfigPropArray(sourceFile || options.configFile, "references"),
|
||||
(property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0
|
||||
);
|
||||
if (referencesSyntax && referencesSyntax.elements.length > index) {
|
||||
programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, arg0, arg1, arg2));
|
||||
programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, arg0, arg1, arg2, arg3));
|
||||
} else {
|
||||
programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2));
|
||||
programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2, arg3));
|
||||
}
|
||||
}
|
||||
function createDiagnosticForOption(onKey, option1, option2, message, arg0, arg1, arg2) {
|
||||
function createDiagnosticForOption(onKey, option1, option2, message, arg0, arg1, arg2, arg3) {
|
||||
const compilerOptionsObjectLiteralSyntax = getCompilerOptionsObjectLiteralSyntax();
|
||||
const needCompilerDiagnostic = !compilerOptionsObjectLiteralSyntax || !createOptionDiagnosticInObjectLiteralSyntax(compilerOptionsObjectLiteralSyntax, onKey, option1, option2, message, arg0, arg1, arg2);
|
||||
const needCompilerDiagnostic = !compilerOptionsObjectLiteralSyntax || !createOptionDiagnosticInObjectLiteralSyntax(compilerOptionsObjectLiteralSyntax, onKey, option1, option2, message, arg0, arg1, arg2, arg3);
|
||||
if (needCompilerDiagnostic) {
|
||||
if ("messageText" in message) {
|
||||
programDiagnostics.add(createCompilerDiagnosticFromMessageChain(message));
|
||||
} else {
|
||||
programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2));
|
||||
programDiagnostics.add(createCompilerDiagnostic(message, arg0, arg1, arg2, arg3));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115747,13 +115758,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
||||
}
|
||||
return _compilerOptionsObjectLiteralSyntax || void 0;
|
||||
}
|
||||
function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key2, message, arg0, arg1, arg2) {
|
||||
function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key2, message, arg0, arg1, arg2, arg3) {
|
||||
const props = getPropertyAssignment(objectLiteral, key1, key2);
|
||||
for (const prop of props) {
|
||||
if ("messageText" in message) {
|
||||
programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message));
|
||||
} else {
|
||||
programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, arg0, arg1, arg2));
|
||||
programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, arg0, arg1, arg2, arg3));
|
||||
}
|
||||
}
|
||||
return !!props.length;
|
||||
|
||||
+329
-259
File diff suppressed because it is too large
Load Diff
Vendored
+6
@@ -6991,6 +6991,12 @@ declare namespace ts {
|
||||
}
|
||||
enum ModuleResolutionKind {
|
||||
Classic = 1,
|
||||
/**
|
||||
* @deprecated
|
||||
* `NodeJs` was renamed to `Node10` to better reflect the version of Node that it targets.
|
||||
* Use the new name or consider switching to a modern module resolution target.
|
||||
*/
|
||||
NodeJs = 2,
|
||||
Node10 = 2,
|
||||
Node16 = 3,
|
||||
NodeNext = 99,
|
||||
|
||||
+330
-259
File diff suppressed because it is too large
Load Diff
Vendored
+6
@@ -3016,6 +3016,12 @@ declare namespace ts {
|
||||
}
|
||||
enum ModuleResolutionKind {
|
||||
Classic = 1,
|
||||
/**
|
||||
* @deprecated
|
||||
* `NodeJs` was renamed to `Node10` to better reflect the version of Node that it targets.
|
||||
* Use the new name or consider switching to a modern module resolution target.
|
||||
*/
|
||||
NodeJs = 2,
|
||||
Node10 = 2,
|
||||
Node16 = 3,
|
||||
NodeNext = 99,
|
||||
|
||||
+330
-258
File diff suppressed because it is too large
Load Diff
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
||||
|
||||
// src/compiler/corePublic.ts
|
||||
var versionMajorMinor = "5.0";
|
||||
var version = `${versionMajorMinor}.1-rc`;
|
||||
var version = "5.0.2";
|
||||
|
||||
// src/compiler/core.ts
|
||||
var emptyArray = [];
|
||||
@@ -3302,6 +3302,7 @@ var DiagnosticCategory = /* @__PURE__ */ ((DiagnosticCategory2) => {
|
||||
})(DiagnosticCategory || {});
|
||||
var ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind2) => {
|
||||
ModuleResolutionKind2[ModuleResolutionKind2["Classic"] = 1] = "Classic";
|
||||
ModuleResolutionKind2[ModuleResolutionKind2["NodeJs"] = 2] = "NodeJs";
|
||||
ModuleResolutionKind2[ModuleResolutionKind2["Node10"] = 2] = "Node10";
|
||||
ModuleResolutionKind2[ModuleResolutionKind2["Node16"] = 3] = "Node16";
|
||||
ModuleResolutionKind2[ModuleResolutionKind2["NodeNext"] = 99] = "NodeNext";
|
||||
@@ -6296,12 +6297,14 @@ var Diagnostics = {
|
||||
Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),
|
||||
An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),
|
||||
Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),
|
||||
Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Flag_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecat_5101", `Flag '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),
|
||||
Flag_0_is_deprecated_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Flag_0_is_deprecated_Please_remove_it_from_your_configuration_5102", "Flag '{0}' is deprecated. Please remove it from your configuration."),
|
||||
Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101", `Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),
|
||||
Option_0_has_been_removed_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102", "Option '{0}' has been removed. Please remove it from your configuration."),
|
||||
Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."),
|
||||
Option_0_is_redundant_and_cannot_be_specified_with_option_1: diag(5104, 1 /* Error */, "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104", "Option '{0}' is redundant and cannot be specified with option '{1}'."),
|
||||
Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System: diag(5105, 1 /* Error */, "Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105", "Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),
|
||||
Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."),
|
||||
Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`),
|
||||
Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."),
|
||||
Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* Message */, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."),
|
||||
Concatenate_and_emit_output_to_single_file: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."),
|
||||
Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"name": "typescript",
|
||||
"author": "Microsoft Corp.",
|
||||
"homepage": "https://www.typescriptlang.org/",
|
||||
"version": "5.0.1-rc",
|
||||
"version": "5.0.2",
|
||||
"license": "Apache-2.0",
|
||||
"description": "TypeScript is a language for application scale JavaScript development",
|
||||
"keywords": [
|
||||
|
||||
@@ -4,7 +4,7 @@ export const versionMajorMinor = "5.0";
|
||||
// The following is baselined as a literal template type without intervention
|
||||
/** The version of the TypeScript compiler release */
|
||||
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
||||
export const version: string = `${versionMajorMinor}.1-rc`;
|
||||
export const version = "5.0.2" as string;
|
||||
|
||||
/**
|
||||
* Type of objects whose values are all of the same type.
|
||||
|
||||
Reference in New Issue
Block a user