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
package/lib/typescript.d.ts
CHANGED
|
@@ -1388,8 +1388,9 @@ declare namespace ts {
|
|
|
1388
1388
|
readonly kind: SyntaxKind.JsxAttribute;
|
|
1389
1389
|
readonly parent: JsxAttributes;
|
|
1390
1390
|
readonly name: Identifier;
|
|
1391
|
-
readonly initializer?:
|
|
1391
|
+
readonly initializer?: JsxAttributeValue;
|
|
1392
1392
|
}
|
|
1393
|
+
export type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
|
|
1393
1394
|
export interface JsxSpreadAttribute extends ObjectLiteralElement {
|
|
1394
1395
|
readonly kind: SyntaxKind.JsxSpreadAttribute;
|
|
1395
1396
|
readonly parent: JsxAttributes;
|
|
@@ -3746,8 +3747,8 @@ declare namespace ts {
|
|
|
3746
3747
|
createJsxOpeningFragment(): JsxOpeningFragment;
|
|
3747
3748
|
createJsxJsxClosingFragment(): JsxClosingFragment;
|
|
3748
3749
|
updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
|
|
3749
|
-
createJsxAttribute(name: Identifier, initializer:
|
|
3750
|
-
updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer:
|
|
3750
|
+
createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
|
3751
|
+
updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
|
3751
3752
|
createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
|
|
3752
3753
|
updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
|
|
3753
3754
|
createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
|
|
@@ -7481,9 +7482,9 @@ declare namespace ts {
|
|
|
7481
7482
|
/** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */
|
|
7482
7483
|
const updateJsxFragment: (node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment;
|
|
7483
7484
|
/** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */
|
|
7484
|
-
const createJsxAttribute: (name: Identifier, initializer:
|
|
7485
|
+
const createJsxAttribute: (name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
|
|
7485
7486
|
/** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */
|
|
7486
|
-
const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer:
|
|
7487
|
+
const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
|
|
7487
7488
|
/** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */
|
|
7488
7489
|
const createJsxAttributes: (properties: readonly JsxAttributeLike[]) => JsxAttributes;
|
|
7489
7490
|
/** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */
|
package/lib/typescript.js
CHANGED
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.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
|
}
|
|
@@ -1388,8 +1388,9 @@ declare namespace ts {
|
|
|
1388
1388
|
readonly kind: SyntaxKind.JsxAttribute;
|
|
1389
1389
|
readonly parent: JsxAttributes;
|
|
1390
1390
|
readonly name: Identifier;
|
|
1391
|
-
readonly initializer?:
|
|
1391
|
+
readonly initializer?: JsxAttributeValue;
|
|
1392
1392
|
}
|
|
1393
|
+
export type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
|
|
1393
1394
|
export interface JsxSpreadAttribute extends ObjectLiteralElement {
|
|
1394
1395
|
readonly kind: SyntaxKind.JsxSpreadAttribute;
|
|
1395
1396
|
readonly parent: JsxAttributes;
|
|
@@ -3746,8 +3747,8 @@ declare namespace ts {
|
|
|
3746
3747
|
createJsxOpeningFragment(): JsxOpeningFragment;
|
|
3747
3748
|
createJsxJsxClosingFragment(): JsxClosingFragment;
|
|
3748
3749
|
updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
|
|
3749
|
-
createJsxAttribute(name: Identifier, initializer:
|
|
3750
|
-
updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer:
|
|
3750
|
+
createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
|
3751
|
+
updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
|
3751
3752
|
createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
|
|
3752
3753
|
updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
|
|
3753
3754
|
createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
|
|
@@ -7481,9 +7482,9 @@ declare namespace ts {
|
|
|
7481
7482
|
/** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */
|
|
7482
7483
|
const updateJsxFragment: (node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment) => JsxFragment;
|
|
7483
7484
|
/** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */
|
|
7484
|
-
const createJsxAttribute: (name: Identifier, initializer:
|
|
7485
|
+
const createJsxAttribute: (name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
|
|
7485
7486
|
/** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */
|
|
7486
|
-
const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer:
|
|
7487
|
+
const updateJsxAttribute: (node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined) => JsxAttribute;
|
|
7487
7488
|
/** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */
|
|
7488
7489
|
const createJsxAttributes: (properties: readonly JsxAttributeLike[]) => JsxAttributes;
|
|
7489
7490
|
/** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */
|