typescript 4.8.0-dev.20220510 → 4.8.0-dev.20220513
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/cs/diagnosticMessages.generated.json +2 -0
- package/lib/de/diagnosticMessages.generated.json +2 -0
- package/lib/es/diagnosticMessages.generated.json +2 -0
- package/lib/fr/diagnosticMessages.generated.json +2 -0
- package/lib/it/diagnosticMessages.generated.json +2 -0
- package/lib/ja/diagnosticMessages.generated.json +2 -0
- package/lib/ko/diagnosticMessages.generated.json +2 -0
- package/lib/lib.es2020.intl.d.ts +29 -5
- package/lib/lib.es2021.intl.d.ts +1 -1
- package/lib/pl/diagnosticMessages.generated.json +2 -0
- package/lib/pt-br/diagnosticMessages.generated.json +2 -0
- package/lib/ru/diagnosticMessages.generated.json +2 -0
- package/lib/tr/diagnosticMessages.generated.json +2 -0
- package/lib/tsc.js +77 -20
- package/lib/tsserver.js +84 -33
- package/lib/tsserverlibrary.d.ts +6 -5
- package/lib/tsserverlibrary.js +84 -33
- package/lib/typescript.d.ts +6 -5
- package/lib/typescript.js +84 -23
- package/lib/typescriptServices.d.ts +6 -5
- package/lib/typescriptServices.js +84 -23
- package/lib/typingsInstaller.js +83 -22
- package/lib/zh-cn/diagnosticMessages.generated.json +1 -0
- package/lib/zh-tw/diagnosticMessages.generated.json +2 -0
- package/package.json +1 -1
|
@@ -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.20220513";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -8336,6 +8336,7 @@ var ts;
|
|
|
8336
8336
|
String_literal_expected: diag(1141, ts.DiagnosticCategory.Error, "String_literal_expected_1141", "String literal expected."),
|
|
8337
8337
|
Line_break_not_permitted_here: diag(1142, ts.DiagnosticCategory.Error, "Line_break_not_permitted_here_1142", "Line break not permitted here."),
|
|
8338
8338
|
or_expected: diag(1144, ts.DiagnosticCategory.Error, "or_expected_1144", "'{' or ';' expected."),
|
|
8339
|
+
or_JSX_element_expected: diag(1145, ts.DiagnosticCategory.Error, "or_JSX_element_expected_1145", "'{' or JSX element expected."),
|
|
8339
8340
|
Declaration_expected: diag(1146, ts.DiagnosticCategory.Error, "Declaration_expected_1146", "Declaration expected."),
|
|
8340
8341
|
Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, ts.DiagnosticCategory.Error, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."),
|
|
8341
8342
|
Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, ts.DiagnosticCategory.Error, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."),
|
|
@@ -8588,6 +8589,7 @@ var ts;
|
|
|
8588
8589
|
resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, ts.DiagnosticCategory.Error, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."),
|
|
8589
8590
|
resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, ts.DiagnosticCategory.Error, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."),
|
|
8590
8591
|
Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1456, ts.DiagnosticCategory.Error, "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),
|
|
8592
|
+
Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk: diag(1457, ts.DiagnosticCategory.Message, "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457", "Matched by default include pattern '**/*'"),
|
|
8591
8593
|
The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),
|
|
8592
8594
|
Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead: diag(1471, ts.DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead."),
|
|
8593
8595
|
catch_or_finally_expected: diag(1472, ts.DiagnosticCategory.Error, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
|
|
@@ -9087,6 +9089,7 @@ var ts;
|
|
|
9087
9089
|
Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, ts.DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),
|
|
9088
9090
|
Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
|
|
9089
9091
|
All_declarations_of_0_must_have_identical_constraints: diag(2838, ts.DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
|
|
9092
|
+
This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, ts.DiagnosticCategory.Error, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
|
|
9090
9093
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
9091
9094
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
9092
9095
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -13397,6 +13400,19 @@ var ts;
|
|
|
13397
13400
|
return isLiteralKind(node.kind);
|
|
13398
13401
|
}
|
|
13399
13402
|
ts.isLiteralExpression = isLiteralExpression;
|
|
13403
|
+
/** @internal */
|
|
13404
|
+
function isLiteralExpressionOfObject(node) {
|
|
13405
|
+
switch (node.kind) {
|
|
13406
|
+
case 205 /* ObjectLiteralExpression */:
|
|
13407
|
+
case 204 /* ArrayLiteralExpression */:
|
|
13408
|
+
case 13 /* RegularExpressionLiteral */:
|
|
13409
|
+
case 213 /* FunctionExpression */:
|
|
13410
|
+
case 226 /* ClassExpression */:
|
|
13411
|
+
return true;
|
|
13412
|
+
}
|
|
13413
|
+
return false;
|
|
13414
|
+
}
|
|
13415
|
+
ts.isLiteralExpressionOfObject = isLiteralExpressionOfObject;
|
|
13400
13416
|
// Pseudo-literals
|
|
13401
13417
|
/* @internal */
|
|
13402
13418
|
function isTemplateLiteralKind(kind) {
|
|
@@ -34576,6 +34592,10 @@ var ts;
|
|
|
34576
34592
|
// isn't actually allowed, but we want to treat it as a lambda so we can provide
|
|
34577
34593
|
// a good error message.
|
|
34578
34594
|
if (ts.isModifierKind(second) && second !== 131 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) {
|
|
34595
|
+
if (nextToken() === 127 /* AsKeyword */) {
|
|
34596
|
+
// https://github.com/microsoft/TypeScript/issues/44466
|
|
34597
|
+
return 0 /* False */;
|
|
34598
|
+
}
|
|
34579
34599
|
return 1 /* True */;
|
|
34580
34600
|
}
|
|
34581
34601
|
// If we had "(" followed by something that's not an identifier,
|
|
@@ -35391,9 +35411,22 @@ var ts;
|
|
|
35391
35411
|
}
|
|
35392
35412
|
scanJsxIdentifier();
|
|
35393
35413
|
var pos = getNodePos();
|
|
35394
|
-
return finishNode(factory.createJsxAttribute(parseIdentifierName(),
|
|
35395
|
-
|
|
35396
|
-
|
|
35414
|
+
return finishNode(factory.createJsxAttribute(parseIdentifierName(), parseJsxAttributeValue()), pos);
|
|
35415
|
+
}
|
|
35416
|
+
function parseJsxAttributeValue() {
|
|
35417
|
+
if (token() === 63 /* EqualsToken */) {
|
|
35418
|
+
if (scanJsxAttributeValue() === 10 /* StringLiteral */) {
|
|
35419
|
+
return parseLiteralNode();
|
|
35420
|
+
}
|
|
35421
|
+
if (token() === 18 /* OpenBraceToken */) {
|
|
35422
|
+
return parseJsxExpression(/*inExpressionContext*/ true);
|
|
35423
|
+
}
|
|
35424
|
+
if (token() === 29 /* LessThanToken */) {
|
|
35425
|
+
return parseJsxElementOrSelfClosingElementOrFragment(/*inExpressionContext*/ true);
|
|
35426
|
+
}
|
|
35427
|
+
parseErrorAtCurrentToken(ts.Diagnostics.or_JSX_element_expected);
|
|
35428
|
+
}
|
|
35429
|
+
return undefined;
|
|
35397
35430
|
}
|
|
35398
35431
|
function parseJsxSpreadAttribute() {
|
|
35399
35432
|
var pos = getNodePos();
|
|
@@ -41165,7 +41198,7 @@ var ts;
|
|
|
41165
41198
|
return undefined;
|
|
41166
41199
|
if (ts.length(specs) !== 1)
|
|
41167
41200
|
return specs;
|
|
41168
|
-
if (specs[0] ===
|
|
41201
|
+
if (specs[0] === ts.defaultIncludeSpec)
|
|
41169
41202
|
return undefined;
|
|
41170
41203
|
return specs;
|
|
41171
41204
|
}
|
|
@@ -41443,6 +41476,8 @@ var ts;
|
|
|
41443
41476
|
// until consistent casing errors are reported
|
|
41444
41477
|
return ts.getDirectoryPath(ts.getNormalizedAbsolutePath(fileName, basePath));
|
|
41445
41478
|
}
|
|
41479
|
+
/*@internal*/
|
|
41480
|
+
ts.defaultIncludeSpec = "**/*";
|
|
41446
41481
|
/**
|
|
41447
41482
|
* Parse the contents of a config file from json or json source file (tsconfig.json).
|
|
41448
41483
|
* @param json The contents of the config file to parse
|
|
@@ -41508,6 +41543,7 @@ var ts;
|
|
|
41508
41543
|
}
|
|
41509
41544
|
var includeSpecs = toPropValue(getSpecsFromRaw("include"));
|
|
41510
41545
|
var excludeOfRaw = getSpecsFromRaw("exclude");
|
|
41546
|
+
var isDefaultIncludeSpec = false;
|
|
41511
41547
|
var excludeSpecs = toPropValue(excludeOfRaw);
|
|
41512
41548
|
if (excludeOfRaw === "no-prop" && raw.compilerOptions) {
|
|
41513
41549
|
var outDir = raw.compilerOptions.outDir;
|
|
@@ -41517,7 +41553,8 @@ var ts;
|
|
|
41517
41553
|
}
|
|
41518
41554
|
}
|
|
41519
41555
|
if (filesSpecs === undefined && includeSpecs === undefined) {
|
|
41520
|
-
includeSpecs = [
|
|
41556
|
+
includeSpecs = [ts.defaultIncludeSpec];
|
|
41557
|
+
isDefaultIncludeSpec = true;
|
|
41521
41558
|
}
|
|
41522
41559
|
var validatedIncludeSpecs, validatedExcludeSpecs;
|
|
41523
41560
|
// The exclude spec list is converted into a regular expression, which allows us to quickly
|
|
@@ -41536,7 +41573,8 @@ var ts;
|
|
|
41536
41573
|
validatedFilesSpec: ts.filter(filesSpecs, ts.isString),
|
|
41537
41574
|
validatedIncludeSpecs: validatedIncludeSpecs,
|
|
41538
41575
|
validatedExcludeSpecs: validatedExcludeSpecs,
|
|
41539
|
-
pathPatterns: undefined,
|
|
41576
|
+
pathPatterns: undefined,
|
|
41577
|
+
isDefaultIncludeSpec: isDefaultIncludeSpec,
|
|
41540
41578
|
};
|
|
41541
41579
|
}
|
|
41542
41580
|
function getFileNames(basePath) {
|
|
@@ -51661,8 +51699,9 @@ var ts;
|
|
|
51661
51699
|
function getExportSymbolOfValueSymbolIfExported(symbol) {
|
|
51662
51700
|
return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol);
|
|
51663
51701
|
}
|
|
51664
|
-
function symbolIsValue(symbol) {
|
|
51665
|
-
return !!(symbol.flags & 111551 /* Value */ ||
|
|
51702
|
+
function symbolIsValue(symbol, includeTypeOnlyMembers) {
|
|
51703
|
+
return !!(symbol.flags & 111551 /* Value */ ||
|
|
51704
|
+
symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */ && (includeTypeOnlyMembers || !getTypeOnlyAliasDeclaration(symbol)));
|
|
51666
51705
|
}
|
|
51667
51706
|
function findConstructorDeclaration(node) {
|
|
51668
51707
|
var members = node.members;
|
|
@@ -59352,12 +59391,12 @@ var ts;
|
|
|
59352
59391
|
* @param type a type to look up property from
|
|
59353
59392
|
* @param name a name of property to look up in a given type
|
|
59354
59393
|
*/
|
|
59355
|
-
function getPropertyOfType(type, name, skipObjectFunctionPropertyAugment) {
|
|
59394
|
+
function getPropertyOfType(type, name, skipObjectFunctionPropertyAugment, includeTypeOnlyMembers) {
|
|
59356
59395
|
type = getReducedApparentType(type);
|
|
59357
59396
|
if (type.flags & 524288 /* Object */) {
|
|
59358
59397
|
var resolved = resolveStructuredTypeMembers(type);
|
|
59359
59398
|
var symbol = resolved.members.get(name);
|
|
59360
|
-
if (symbol && symbolIsValue(symbol)) {
|
|
59399
|
+
if (symbol && symbolIsValue(symbol, includeTypeOnlyMembers)) {
|
|
59361
59400
|
return symbol;
|
|
59362
59401
|
}
|
|
59363
59402
|
if (skipObjectFunctionPropertyAugment)
|
|
@@ -62737,7 +62776,7 @@ var ts;
|
|
|
62737
62776
|
// the `exports` lookup process that only looks up namespace members which is used for most type references
|
|
62738
62777
|
var mergedResolvedSymbol = getMergedSymbol(resolveSymbol(currentNamespace));
|
|
62739
62778
|
var next = node.isTypeOf
|
|
62740
|
-
? getPropertyOfType(getTypeOfSymbol(mergedResolvedSymbol), current.escapedText)
|
|
62779
|
+
? getPropertyOfType(getTypeOfSymbol(mergedResolvedSymbol), current.escapedText, /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ true)
|
|
62741
62780
|
: getSymbol(getExportsOfSymbol(mergedResolvedSymbol), current.escapedText, meaning);
|
|
62742
62781
|
if (!next) {
|
|
62743
62782
|
error(current, ts.Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), ts.declarationNameToString(current));
|
|
@@ -74653,9 +74692,8 @@ var ts;
|
|
|
74653
74692
|
markAliasReferenced(parentSymbol, node);
|
|
74654
74693
|
}
|
|
74655
74694
|
return isErrorType(apparentType) ? errorType : apparentType;
|
|
74656
|
-
;
|
|
74657
74695
|
}
|
|
74658
|
-
prop = getPropertyOfType(apparentType, right.escapedText);
|
|
74696
|
+
prop = getPropertyOfType(apparentType, right.escapedText, /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ node.kind === 161 /* QualifiedName */);
|
|
74659
74697
|
}
|
|
74660
74698
|
// In `Foo.Bar.Baz`, 'Foo' is not referenced if 'Bar' is a const enum or a module containing only const enums.
|
|
74661
74699
|
// `Foo` is also not referenced in `enum FooCopy { Bar = Foo.Bar }`, because the enum member value gets inlined
|
|
@@ -79147,6 +79185,10 @@ var ts;
|
|
|
79147
79185
|
case 35 /* ExclamationEqualsToken */:
|
|
79148
79186
|
case 36 /* EqualsEqualsEqualsToken */:
|
|
79149
79187
|
case 37 /* ExclamationEqualsEqualsToken */:
|
|
79188
|
+
if (ts.isLiteralExpressionOfObject(left) || ts.isLiteralExpressionOfObject(right)) {
|
|
79189
|
+
var eqType = operator === 34 /* EqualsEqualsToken */ || operator === 36 /* EqualsEqualsEqualsToken */;
|
|
79190
|
+
error(errorNode, ts.Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true");
|
|
79191
|
+
}
|
|
79150
79192
|
reportOperatorErrorUnless(function (left, right) { return isTypeEqualityComparableTo(left, right) || isTypeEqualityComparableTo(right, left); });
|
|
79151
79193
|
return booleanType;
|
|
79152
79194
|
case 102 /* InstanceOfKeyword */:
|
|
@@ -97993,22 +98035,29 @@ var ts;
|
|
|
97993
98035
|
if (node === undefined) {
|
|
97994
98036
|
return factory.createTrue();
|
|
97995
98037
|
}
|
|
97996
|
-
|
|
98038
|
+
if (node.kind === 10 /* StringLiteral */) {
|
|
97997
98039
|
// Always recreate the literal to escape any escape sequences or newlines which may be in the original jsx string and which
|
|
97998
98040
|
// Need to be escaped to be handled correctly in a normal string
|
|
97999
98041
|
var singleQuote = node.singleQuote !== undefined ? node.singleQuote : !ts.isStringDoubleQuoted(node, currentSourceFile);
|
|
98000
98042
|
var literal = factory.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote);
|
|
98001
98043
|
return ts.setTextRange(literal, node);
|
|
98002
98044
|
}
|
|
98003
|
-
|
|
98045
|
+
if (node.kind === 288 /* JsxExpression */) {
|
|
98004
98046
|
if (node.expression === undefined) {
|
|
98005
98047
|
return factory.createTrue();
|
|
98006
98048
|
}
|
|
98007
98049
|
return ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
98008
98050
|
}
|
|
98009
|
-
|
|
98010
|
-
return
|
|
98051
|
+
if (ts.isJsxElement(node)) {
|
|
98052
|
+
return visitJsxElement(node, /*isChild*/ false);
|
|
98053
|
+
}
|
|
98054
|
+
if (ts.isJsxSelfClosingElement(node)) {
|
|
98055
|
+
return visitJsxSelfClosingElement(node, /*isChild*/ false);
|
|
98011
98056
|
}
|
|
98057
|
+
if (ts.isJsxFragment(node)) {
|
|
98058
|
+
return visitJsxFragment(node, /*isChild*/ false);
|
|
98059
|
+
}
|
|
98060
|
+
return ts.Debug.failBadSyntaxKind(node);
|
|
98012
98061
|
}
|
|
98013
98062
|
function visitJsxText(node) {
|
|
98014
98063
|
var fixed = fixupWhitespaceAndDecodeEntities(node.text);
|
|
@@ -119023,7 +119072,7 @@ var ts;
|
|
|
119023
119072
|
}
|
|
119024
119073
|
var matchedByInclude = ts.getMatchedIncludeSpec(program, fileName);
|
|
119025
119074
|
// Could be additional files specified as roots
|
|
119026
|
-
if (!matchedByInclude)
|
|
119075
|
+
if (!matchedByInclude || !ts.isString(matchedByInclude))
|
|
119027
119076
|
return undefined;
|
|
119028
119077
|
configFileNode = ts.getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude);
|
|
119029
119078
|
message = ts.Diagnostics.File_is_matched_by_include_pattern_specified_here;
|
|
@@ -122911,6 +122960,9 @@ var ts;
|
|
|
122911
122960
|
var configFile = program.getCompilerOptions().configFile;
|
|
122912
122961
|
if (!((_a = configFile === null || configFile === void 0 ? void 0 : configFile.configFileSpecs) === null || _a === void 0 ? void 0 : _a.validatedIncludeSpecs))
|
|
122913
122962
|
return undefined;
|
|
122963
|
+
// Return true if its default include spec
|
|
122964
|
+
if (configFile.configFileSpecs.isDefaultIncludeSpec)
|
|
122965
|
+
return true;
|
|
122914
122966
|
var isJsonFile = ts.fileExtensionIs(fileName, ".json" /* Json */);
|
|
122915
122967
|
var basePath = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory()));
|
|
122916
122968
|
var useCaseSensitiveFileNames = program.useCaseSensitiveFileNames();
|
|
@@ -122976,11 +123028,13 @@ var ts;
|
|
|
122976
123028
|
if (matchedByFiles)
|
|
122977
123029
|
return ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.Part_of_files_list_in_tsconfig_json);
|
|
122978
123030
|
var matchedByInclude = getMatchedIncludeSpec(program, fileName);
|
|
122979
|
-
return matchedByInclude ?
|
|
123031
|
+
return ts.isString(matchedByInclude) ?
|
|
122980
123032
|
ts.chainDiagnosticMessages(
|
|
122981
123033
|
/*details*/ undefined, ts.Diagnostics.Matched_by_include_pattern_0_in_1, matchedByInclude, toFileName(options.configFile, fileNameConvertor)) :
|
|
122982
|
-
// Could be additional files specified as roots
|
|
122983
|
-
ts.chainDiagnosticMessages(/*details*/ undefined,
|
|
123034
|
+
// Could be additional files specified as roots or matched by default include
|
|
123035
|
+
ts.chainDiagnosticMessages(/*details*/ undefined, matchedByInclude ?
|
|
123036
|
+
ts.Diagnostics.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk :
|
|
123037
|
+
ts.Diagnostics.Root_file_specified_for_compilation);
|
|
122984
123038
|
case ts.FileIncludeKind.SourceFromProjectReference:
|
|
122985
123039
|
case ts.FileIncludeKind.OutputFromProjectReference:
|
|
122986
123040
|
var isOutput = reason.kind === ts.FileIncludeKind.OutputFromProjectReference;
|
|
@@ -123104,6 +123158,13 @@ var ts;
|
|
|
123104
123158
|
ExtendedConfigOfReferencedProject: "Extended config file of referenced project",
|
|
123105
123159
|
WildcardDirectoryOfReferencedProject: "Wild card directory of referenced project",
|
|
123106
123160
|
PackageJson: "package.json file",
|
|
123161
|
+
ClosedScriptInfo: "Closed Script info",
|
|
123162
|
+
ConfigFileForInferredRoot: "Config file for the inferred project root",
|
|
123163
|
+
NodeModules: "node_modules for closed script infos and package.jsons affecting module specifier cache",
|
|
123164
|
+
MissingSourceMapFile: "Missing source map file",
|
|
123165
|
+
NoopConfigFileForInferredRoot: "Noop Config file for the inferred project root",
|
|
123166
|
+
MissingGeneratedFile: "Missing generated file",
|
|
123167
|
+
NodeModulesForModuleSpecifierCache: "node_modules for module specifier cache invalidation",
|
|
123107
123168
|
};
|
|
123108
123169
|
function createWatchFactory(host, options) {
|
|
123109
123170
|
var watchLogLevel = host.trace ? options.extendedDiagnostics ? ts.WatchLogLevel.Verbose : options.diagnostics ? ts.WatchLogLevel.TriggerOnly : ts.WatchLogLevel.None : ts.WatchLogLevel.None;
|
|
@@ -166287,7 +166348,7 @@ var ts;
|
|
|
166287
166348
|
function getDefaultLibFilePath(options) {
|
|
166288
166349
|
// Check __dirname is defined and that we are on a node.js system.
|
|
166289
166350
|
if (typeof __dirname !== "undefined") {
|
|
166290
|
-
return
|
|
166351
|
+
return ts.combinePaths(__dirname, ts.getDefaultLibFileName(options));
|
|
166291
166352
|
}
|
|
166292
166353
|
throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ");
|
|
166293
166354
|
}
|
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.20220513";
|
|
93
93
|
/* @internal */
|
|
94
94
|
var Comparison;
|
|
95
95
|
(function (Comparison) {
|
|
@@ -8131,6 +8131,7 @@ var ts;
|
|
|
8131
8131
|
String_literal_expected: diag(1141, ts.DiagnosticCategory.Error, "String_literal_expected_1141", "String literal expected."),
|
|
8132
8132
|
Line_break_not_permitted_here: diag(1142, ts.DiagnosticCategory.Error, "Line_break_not_permitted_here_1142", "Line break not permitted here."),
|
|
8133
8133
|
or_expected: diag(1144, ts.DiagnosticCategory.Error, "or_expected_1144", "'{' or ';' expected."),
|
|
8134
|
+
or_JSX_element_expected: diag(1145, ts.DiagnosticCategory.Error, "or_JSX_element_expected_1145", "'{' or JSX element expected."),
|
|
8134
8135
|
Declaration_expected: diag(1146, ts.DiagnosticCategory.Error, "Declaration_expected_1146", "Declaration expected."),
|
|
8135
8136
|
Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, ts.DiagnosticCategory.Error, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."),
|
|
8136
8137
|
Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, ts.DiagnosticCategory.Error, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."),
|
|
@@ -8383,6 +8384,7 @@ var ts;
|
|
|
8383
8384
|
resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, ts.DiagnosticCategory.Error, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."),
|
|
8384
8385
|
resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, ts.DiagnosticCategory.Error, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."),
|
|
8385
8386
|
Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1456, ts.DiagnosticCategory.Error, "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),
|
|
8387
|
+
Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk: diag(1457, ts.DiagnosticCategory.Message, "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457", "Matched by default include pattern '**/*'"),
|
|
8386
8388
|
The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),
|
|
8387
8389
|
Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead: diag(1471, ts.DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead."),
|
|
8388
8390
|
catch_or_finally_expected: diag(1472, ts.DiagnosticCategory.Error, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."),
|
|
@@ -8882,6 +8884,7 @@ var ts;
|
|
|
8882
8884
|
Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, ts.DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),
|
|
8883
8885
|
Import_assertion_values_must_be_string_literal_expressions: diag(2837, ts.DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
|
|
8884
8886
|
All_declarations_of_0_must_have_identical_constraints: diag(2838, ts.DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
|
|
8887
|
+
This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, ts.DiagnosticCategory.Error, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
|
|
8885
8888
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
8886
8889
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
8887
8890
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -13192,6 +13195,19 @@ var ts;
|
|
|
13192
13195
|
return isLiteralKind(node.kind);
|
|
13193
13196
|
}
|
|
13194
13197
|
ts.isLiteralExpression = isLiteralExpression;
|
|
13198
|
+
/** @internal */
|
|
13199
|
+
function isLiteralExpressionOfObject(node) {
|
|
13200
|
+
switch (node.kind) {
|
|
13201
|
+
case 205 /* ObjectLiteralExpression */:
|
|
13202
|
+
case 204 /* ArrayLiteralExpression */:
|
|
13203
|
+
case 13 /* RegularExpressionLiteral */:
|
|
13204
|
+
case 213 /* FunctionExpression */:
|
|
13205
|
+
case 226 /* ClassExpression */:
|
|
13206
|
+
return true;
|
|
13207
|
+
}
|
|
13208
|
+
return false;
|
|
13209
|
+
}
|
|
13210
|
+
ts.isLiteralExpressionOfObject = isLiteralExpressionOfObject;
|
|
13195
13211
|
// Pseudo-literals
|
|
13196
13212
|
/* @internal */
|
|
13197
13213
|
function isTemplateLiteralKind(kind) {
|
|
@@ -34371,6 +34387,10 @@ var ts;
|
|
|
34371
34387
|
// isn't actually allowed, but we want to treat it as a lambda so we can provide
|
|
34372
34388
|
// a good error message.
|
|
34373
34389
|
if (ts.isModifierKind(second) && second !== 131 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) {
|
|
34390
|
+
if (nextToken() === 127 /* AsKeyword */) {
|
|
34391
|
+
// https://github.com/microsoft/TypeScript/issues/44466
|
|
34392
|
+
return 0 /* False */;
|
|
34393
|
+
}
|
|
34374
34394
|
return 1 /* True */;
|
|
34375
34395
|
}
|
|
34376
34396
|
// If we had "(" followed by something that's not an identifier,
|
|
@@ -35186,9 +35206,22 @@ var ts;
|
|
|
35186
35206
|
}
|
|
35187
35207
|
scanJsxIdentifier();
|
|
35188
35208
|
var pos = getNodePos();
|
|
35189
|
-
return finishNode(factory.createJsxAttribute(parseIdentifierName(),
|
|
35190
|
-
|
|
35191
|
-
|
|
35209
|
+
return finishNode(factory.createJsxAttribute(parseIdentifierName(), parseJsxAttributeValue()), pos);
|
|
35210
|
+
}
|
|
35211
|
+
function parseJsxAttributeValue() {
|
|
35212
|
+
if (token() === 63 /* EqualsToken */) {
|
|
35213
|
+
if (scanJsxAttributeValue() === 10 /* StringLiteral */) {
|
|
35214
|
+
return parseLiteralNode();
|
|
35215
|
+
}
|
|
35216
|
+
if (token() === 18 /* OpenBraceToken */) {
|
|
35217
|
+
return parseJsxExpression(/*inExpressionContext*/ true);
|
|
35218
|
+
}
|
|
35219
|
+
if (token() === 29 /* LessThanToken */) {
|
|
35220
|
+
return parseJsxElementOrSelfClosingElementOrFragment(/*inExpressionContext*/ true);
|
|
35221
|
+
}
|
|
35222
|
+
parseErrorAtCurrentToken(ts.Diagnostics.or_JSX_element_expected);
|
|
35223
|
+
}
|
|
35224
|
+
return undefined;
|
|
35192
35225
|
}
|
|
35193
35226
|
function parseJsxSpreadAttribute() {
|
|
35194
35227
|
var pos = getNodePos();
|
|
@@ -40960,7 +40993,7 @@ var ts;
|
|
|
40960
40993
|
return undefined;
|
|
40961
40994
|
if (ts.length(specs) !== 1)
|
|
40962
40995
|
return specs;
|
|
40963
|
-
if (specs[0] ===
|
|
40996
|
+
if (specs[0] === ts.defaultIncludeSpec)
|
|
40964
40997
|
return undefined;
|
|
40965
40998
|
return specs;
|
|
40966
40999
|
}
|
|
@@ -41238,6 +41271,8 @@ var ts;
|
|
|
41238
41271
|
// until consistent casing errors are reported
|
|
41239
41272
|
return ts.getDirectoryPath(ts.getNormalizedAbsolutePath(fileName, basePath));
|
|
41240
41273
|
}
|
|
41274
|
+
/*@internal*/
|
|
41275
|
+
ts.defaultIncludeSpec = "**/*";
|
|
41241
41276
|
/**
|
|
41242
41277
|
* Parse the contents of a config file from json or json source file (tsconfig.json).
|
|
41243
41278
|
* @param json The contents of the config file to parse
|
|
@@ -41303,6 +41338,7 @@ var ts;
|
|
|
41303
41338
|
}
|
|
41304
41339
|
var includeSpecs = toPropValue(getSpecsFromRaw("include"));
|
|
41305
41340
|
var excludeOfRaw = getSpecsFromRaw("exclude");
|
|
41341
|
+
var isDefaultIncludeSpec = false;
|
|
41306
41342
|
var excludeSpecs = toPropValue(excludeOfRaw);
|
|
41307
41343
|
if (excludeOfRaw === "no-prop" && raw.compilerOptions) {
|
|
41308
41344
|
var outDir = raw.compilerOptions.outDir;
|
|
@@ -41312,7 +41348,8 @@ var ts;
|
|
|
41312
41348
|
}
|
|
41313
41349
|
}
|
|
41314
41350
|
if (filesSpecs === undefined && includeSpecs === undefined) {
|
|
41315
|
-
includeSpecs = [
|
|
41351
|
+
includeSpecs = [ts.defaultIncludeSpec];
|
|
41352
|
+
isDefaultIncludeSpec = true;
|
|
41316
41353
|
}
|
|
41317
41354
|
var validatedIncludeSpecs, validatedExcludeSpecs;
|
|
41318
41355
|
// The exclude spec list is converted into a regular expression, which allows us to quickly
|
|
@@ -41331,7 +41368,8 @@ var ts;
|
|
|
41331
41368
|
validatedFilesSpec: ts.filter(filesSpecs, ts.isString),
|
|
41332
41369
|
validatedIncludeSpecs: validatedIncludeSpecs,
|
|
41333
41370
|
validatedExcludeSpecs: validatedExcludeSpecs,
|
|
41334
|
-
pathPatterns: undefined,
|
|
41371
|
+
pathPatterns: undefined,
|
|
41372
|
+
isDefaultIncludeSpec: isDefaultIncludeSpec,
|
|
41335
41373
|
};
|
|
41336
41374
|
}
|
|
41337
41375
|
function getFileNames(basePath) {
|
|
@@ -51456,8 +51494,9 @@ var ts;
|
|
|
51456
51494
|
function getExportSymbolOfValueSymbolIfExported(symbol) {
|
|
51457
51495
|
return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol);
|
|
51458
51496
|
}
|
|
51459
|
-
function symbolIsValue(symbol) {
|
|
51460
|
-
return !!(symbol.flags & 111551 /* Value */ ||
|
|
51497
|
+
function symbolIsValue(symbol, includeTypeOnlyMembers) {
|
|
51498
|
+
return !!(symbol.flags & 111551 /* Value */ ||
|
|
51499
|
+
symbol.flags & 2097152 /* Alias */ && resolveAlias(symbol).flags & 111551 /* Value */ && (includeTypeOnlyMembers || !getTypeOnlyAliasDeclaration(symbol)));
|
|
51461
51500
|
}
|
|
51462
51501
|
function findConstructorDeclaration(node) {
|
|
51463
51502
|
var members = node.members;
|
|
@@ -59147,12 +59186,12 @@ var ts;
|
|
|
59147
59186
|
* @param type a type to look up property from
|
|
59148
59187
|
* @param name a name of property to look up in a given type
|
|
59149
59188
|
*/
|
|
59150
|
-
function getPropertyOfType(type, name, skipObjectFunctionPropertyAugment) {
|
|
59189
|
+
function getPropertyOfType(type, name, skipObjectFunctionPropertyAugment, includeTypeOnlyMembers) {
|
|
59151
59190
|
type = getReducedApparentType(type);
|
|
59152
59191
|
if (type.flags & 524288 /* Object */) {
|
|
59153
59192
|
var resolved = resolveStructuredTypeMembers(type);
|
|
59154
59193
|
var symbol = resolved.members.get(name);
|
|
59155
|
-
if (symbol && symbolIsValue(symbol)) {
|
|
59194
|
+
if (symbol && symbolIsValue(symbol, includeTypeOnlyMembers)) {
|
|
59156
59195
|
return symbol;
|
|
59157
59196
|
}
|
|
59158
59197
|
if (skipObjectFunctionPropertyAugment)
|
|
@@ -62532,7 +62571,7 @@ var ts;
|
|
|
62532
62571
|
// the `exports` lookup process that only looks up namespace members which is used for most type references
|
|
62533
62572
|
var mergedResolvedSymbol = getMergedSymbol(resolveSymbol(currentNamespace));
|
|
62534
62573
|
var next = node.isTypeOf
|
|
62535
|
-
? getPropertyOfType(getTypeOfSymbol(mergedResolvedSymbol), current.escapedText)
|
|
62574
|
+
? getPropertyOfType(getTypeOfSymbol(mergedResolvedSymbol), current.escapedText, /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ true)
|
|
62536
62575
|
: getSymbol(getExportsOfSymbol(mergedResolvedSymbol), current.escapedText, meaning);
|
|
62537
62576
|
if (!next) {
|
|
62538
62577
|
error(current, ts.Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), ts.declarationNameToString(current));
|
|
@@ -74448,9 +74487,8 @@ var ts;
|
|
|
74448
74487
|
markAliasReferenced(parentSymbol, node);
|
|
74449
74488
|
}
|
|
74450
74489
|
return isErrorType(apparentType) ? errorType : apparentType;
|
|
74451
|
-
;
|
|
74452
74490
|
}
|
|
74453
|
-
prop = getPropertyOfType(apparentType, right.escapedText);
|
|
74491
|
+
prop = getPropertyOfType(apparentType, right.escapedText, /*skipObjectFunctionPropertyAugment*/ false, /*includeTypeOnlyMembers*/ node.kind === 161 /* QualifiedName */);
|
|
74454
74492
|
}
|
|
74455
74493
|
// In `Foo.Bar.Baz`, 'Foo' is not referenced if 'Bar' is a const enum or a module containing only const enums.
|
|
74456
74494
|
// `Foo` is also not referenced in `enum FooCopy { Bar = Foo.Bar }`, because the enum member value gets inlined
|
|
@@ -78942,6 +78980,10 @@ var ts;
|
|
|
78942
78980
|
case 35 /* ExclamationEqualsToken */:
|
|
78943
78981
|
case 36 /* EqualsEqualsEqualsToken */:
|
|
78944
78982
|
case 37 /* ExclamationEqualsEqualsToken */:
|
|
78983
|
+
if (ts.isLiteralExpressionOfObject(left) || ts.isLiteralExpressionOfObject(right)) {
|
|
78984
|
+
var eqType = operator === 34 /* EqualsEqualsToken */ || operator === 36 /* EqualsEqualsEqualsToken */;
|
|
78985
|
+
error(errorNode, ts.Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true");
|
|
78986
|
+
}
|
|
78945
78987
|
reportOperatorErrorUnless(function (left, right) { return isTypeEqualityComparableTo(left, right) || isTypeEqualityComparableTo(right, left); });
|
|
78946
78988
|
return booleanType;
|
|
78947
78989
|
case 102 /* InstanceOfKeyword */:
|
|
@@ -97788,22 +97830,29 @@ var ts;
|
|
|
97788
97830
|
if (node === undefined) {
|
|
97789
97831
|
return factory.createTrue();
|
|
97790
97832
|
}
|
|
97791
|
-
|
|
97833
|
+
if (node.kind === 10 /* StringLiteral */) {
|
|
97792
97834
|
// Always recreate the literal to escape any escape sequences or newlines which may be in the original jsx string and which
|
|
97793
97835
|
// Need to be escaped to be handled correctly in a normal string
|
|
97794
97836
|
var singleQuote = node.singleQuote !== undefined ? node.singleQuote : !ts.isStringDoubleQuoted(node, currentSourceFile);
|
|
97795
97837
|
var literal = factory.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote);
|
|
97796
97838
|
return ts.setTextRange(literal, node);
|
|
97797
97839
|
}
|
|
97798
|
-
|
|
97840
|
+
if (node.kind === 288 /* JsxExpression */) {
|
|
97799
97841
|
if (node.expression === undefined) {
|
|
97800
97842
|
return factory.createTrue();
|
|
97801
97843
|
}
|
|
97802
97844
|
return ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
97803
97845
|
}
|
|
97804
|
-
|
|
97805
|
-
return
|
|
97846
|
+
if (ts.isJsxElement(node)) {
|
|
97847
|
+
return visitJsxElement(node, /*isChild*/ false);
|
|
97848
|
+
}
|
|
97849
|
+
if (ts.isJsxSelfClosingElement(node)) {
|
|
97850
|
+
return visitJsxSelfClosingElement(node, /*isChild*/ false);
|
|
97806
97851
|
}
|
|
97852
|
+
if (ts.isJsxFragment(node)) {
|
|
97853
|
+
return visitJsxFragment(node, /*isChild*/ false);
|
|
97854
|
+
}
|
|
97855
|
+
return ts.Debug.failBadSyntaxKind(node);
|
|
97807
97856
|
}
|
|
97808
97857
|
function visitJsxText(node) {
|
|
97809
97858
|
var fixed = fixupWhitespaceAndDecodeEntities(node.text);
|
|
@@ -118818,7 +118867,7 @@ var ts;
|
|
|
118818
118867
|
}
|
|
118819
118868
|
var matchedByInclude = ts.getMatchedIncludeSpec(program, fileName);
|
|
118820
118869
|
// Could be additional files specified as roots
|
|
118821
|
-
if (!matchedByInclude)
|
|
118870
|
+
if (!matchedByInclude || !ts.isString(matchedByInclude))
|
|
118822
118871
|
return undefined;
|
|
118823
118872
|
configFileNode = ts.getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude);
|
|
118824
118873
|
message = ts.Diagnostics.File_is_matched_by_include_pattern_specified_here;
|
|
@@ -122706,6 +122755,9 @@ var ts;
|
|
|
122706
122755
|
var configFile = program.getCompilerOptions().configFile;
|
|
122707
122756
|
if (!((_a = configFile === null || configFile === void 0 ? void 0 : configFile.configFileSpecs) === null || _a === void 0 ? void 0 : _a.validatedIncludeSpecs))
|
|
122708
122757
|
return undefined;
|
|
122758
|
+
// Return true if its default include spec
|
|
122759
|
+
if (configFile.configFileSpecs.isDefaultIncludeSpec)
|
|
122760
|
+
return true;
|
|
122709
122761
|
var isJsonFile = ts.fileExtensionIs(fileName, ".json" /* Json */);
|
|
122710
122762
|
var basePath = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory()));
|
|
122711
122763
|
var useCaseSensitiveFileNames = program.useCaseSensitiveFileNames();
|
|
@@ -122771,11 +122823,13 @@ var ts;
|
|
|
122771
122823
|
if (matchedByFiles)
|
|
122772
122824
|
return ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.Part_of_files_list_in_tsconfig_json);
|
|
122773
122825
|
var matchedByInclude = getMatchedIncludeSpec(program, fileName);
|
|
122774
|
-
return matchedByInclude ?
|
|
122826
|
+
return ts.isString(matchedByInclude) ?
|
|
122775
122827
|
ts.chainDiagnosticMessages(
|
|
122776
122828
|
/*details*/ undefined, ts.Diagnostics.Matched_by_include_pattern_0_in_1, matchedByInclude, toFileName(options.configFile, fileNameConvertor)) :
|
|
122777
|
-
// Could be additional files specified as roots
|
|
122778
|
-
ts.chainDiagnosticMessages(/*details*/ undefined,
|
|
122829
|
+
// Could be additional files specified as roots or matched by default include
|
|
122830
|
+
ts.chainDiagnosticMessages(/*details*/ undefined, matchedByInclude ?
|
|
122831
|
+
ts.Diagnostics.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk :
|
|
122832
|
+
ts.Diagnostics.Root_file_specified_for_compilation);
|
|
122779
122833
|
case ts.FileIncludeKind.SourceFromProjectReference:
|
|
122780
122834
|
case ts.FileIncludeKind.OutputFromProjectReference:
|
|
122781
122835
|
var isOutput = reason.kind === ts.FileIncludeKind.OutputFromProjectReference;
|
|
@@ -122899,6 +122953,13 @@ var ts;
|
|
|
122899
122953
|
ExtendedConfigOfReferencedProject: "Extended config file of referenced project",
|
|
122900
122954
|
WildcardDirectoryOfReferencedProject: "Wild card directory of referenced project",
|
|
122901
122955
|
PackageJson: "package.json file",
|
|
122956
|
+
ClosedScriptInfo: "Closed Script info",
|
|
122957
|
+
ConfigFileForInferredRoot: "Config file for the inferred project root",
|
|
122958
|
+
NodeModules: "node_modules for closed script infos and package.jsons affecting module specifier cache",
|
|
122959
|
+
MissingSourceMapFile: "Missing source map file",
|
|
122960
|
+
NoopConfigFileForInferredRoot: "Noop Config file for the inferred project root",
|
|
122961
|
+
MissingGeneratedFile: "Missing generated file",
|
|
122962
|
+
NodeModulesForModuleSpecifierCache: "node_modules for module specifier cache invalidation",
|
|
122902
122963
|
};
|
|
122903
122964
|
function createWatchFactory(host, options) {
|
|
122904
122965
|
var watchLogLevel = host.trace ? options.extendedDiagnostics ? ts.WatchLogLevel.Verbose : options.diagnostics ? ts.WatchLogLevel.TriggerOnly : ts.WatchLogLevel.None : ts.WatchLogLevel.None;
|
|
@@ -1199,6 +1199,7 @@
|
|
|
1199
1199
|
"Required_type_parameters_may_not_follow_optional_type_parameters_2706": "所需的类型参数可能不遵循可选类型参数。",
|
|
1200
1200
|
"Resolution_for_module_0_was_found_in_cache_from_location_1_6147": "在位置“{1}”的缓存中找到模块“{0}”的解析。",
|
|
1201
1201
|
"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241": "在位置“{1}”的缓存中找到类型引用指令“{0}”的解析。",
|
|
1202
|
+
"Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125": "解决模式断言不稳定。使用夜间 TypeScript 消除此错误。请尝试使用 “npm install -D typescript@next” 进行更新。",
|
|
1202
1203
|
"Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452": "仅当 `moduleResolution` 为 `node16` 或 `nodenext` 时才支持解析模式。",
|
|
1203
1204
|
"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195": "只将 \"keyof\" 解析为字符串值的属性名称(不含数字或符号)。",
|
|
1204
1205
|
"Resolving_module_0_from_1_6086": "======== 正在从“{1}”解析模块“{0}”。========",
|
|
@@ -893,6 +893,7 @@
|
|
|
893
893
|
"Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650": "僅讓 keyof 傳回字串,而不是單一字串、數字或符號。舊版選項。",
|
|
894
894
|
"Make_super_call_the_first_statement_in_the_constructor_90002": "使 'super()' 呼叫成為建構函式中的第一個陳述式",
|
|
895
895
|
"Mapped_object_type_implicitly_has_an_any_template_type_7039": "對應的物件類型隱含具有 'any' 範本類型。",
|
|
896
|
+
"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457": "依預設比對包含模式 '**/*'",
|
|
896
897
|
"Matched_by_include_pattern_0_in_1_1407": "依 '{1}' 中的包含模式 '{0}' 比對",
|
|
897
898
|
"Member_0_implicitly_has_an_1_type_7008": "成員 '{0}' 隱含了 '{1}' 類型。",
|
|
898
899
|
"Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045": "成員 '{0}' 隱含 '{1}' 類型,但可從使用方式推斷更適合的類型。",
|
|
@@ -1199,6 +1200,7 @@
|
|
|
1199
1200
|
"Required_type_parameters_may_not_follow_optional_type_parameters_2706": "必要型別參數可能未遵循選擇性型別參數。",
|
|
1200
1201
|
"Resolution_for_module_0_was_found_in_cache_from_location_1_6147": "從位置 '{1}' 的快取中找到模組 '{0}' 的解析。",
|
|
1201
1202
|
"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241": "從位置 '{0}' 的快取記憶體找到類型參照指示詞 '{1}'。",
|
|
1203
|
+
"Resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125": "解析模式宣告不穩定。使用夜間 TypeScript 將此錯誤設為靜音。請嘗試使用 'npm install -D typescript@next' 更新。",
|
|
1202
1204
|
"Resolution_modes_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452": "只有當 'moduleResolution' 為 'node16' 或 'nodenext' 時,才支援解析模式。",
|
|
1203
1205
|
"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195": "只將 'keyof' 解析為字串值的屬性名稱 (無任何數字或符號)。",
|
|
1204
1206
|
"Resolving_module_0_from_1_6086": "======== 正在從 '{1}' 解析模組 '{0}'。========",
|
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.20220513",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|