typescript 4.7.0-dev.20220217 → 4.7.0-dev.20220221

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/tsserver.js CHANGED
@@ -100,7 +100,7 @@ var ts;
100
100
  // The following is baselined as a literal template type without intervention
101
101
  /** The version of the TypeScript compiler release */
102
102
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
103
- ts.version = ts.versionMajorMinor + ".0-dev.20220217";
103
+ ts.version = ts.versionMajorMinor + ".0-dev.20220221";
104
104
  /* @internal */
105
105
  var Comparison;
106
106
  (function (Comparison) {
@@ -2423,7 +2423,7 @@ var ts;
2423
2423
  Debug.checkEachDefined = checkEachDefined;
2424
2424
  function assertNever(member, message, stackCrawlMark) {
2425
2425
  if (message === void 0) { message = "Illegal value:"; }
2426
- var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
2426
+ var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
2427
2427
  return fail(message + " " + detail, stackCrawlMark || assertNever);
2428
2428
  }
2429
2429
  Debug.assertNever = assertNever;
@@ -9576,7 +9576,7 @@ var ts;
9576
9576
  Fix_all_implicit_this_errors: diag(95107, ts.DiagnosticCategory.Message, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"),
9577
9577
  Wrap_invalid_character_in_an_expression_container: diag(95108, ts.DiagnosticCategory.Message, "Wrap_invalid_character_in_an_expression_container_95108", "Wrap invalid character in an expression container"),
9578
9578
  Wrap_all_invalid_characters_in_an_expression_container: diag(95109, ts.DiagnosticCategory.Message, "Wrap_all_invalid_characters_in_an_expression_container_95109", "Wrap all invalid characters in an expression container"),
9579
- Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file: diag(95110, ts.DiagnosticCategory.Message, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig.json to read more about this file"),
9579
+ Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file: diag(95110, ts.DiagnosticCategory.Message, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig to read more about this file"),
9580
9580
  Add_a_return_statement: diag(95111, ts.DiagnosticCategory.Message, "Add_a_return_statement_95111", "Add a return statement"),
9581
9581
  Remove_braces_from_arrow_function_body: diag(95112, ts.DiagnosticCategory.Message, "Remove_braces_from_arrow_function_body_95112", "Remove braces from arrow function body"),
9582
9582
  Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal: diag(95113, ts.DiagnosticCategory.Message, "Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113", "Wrap the following body with parentheses which should be an object literal"),
@@ -40463,7 +40463,7 @@ var ts;
40463
40463
  var result = [];
40464
40464
  result.push("{");
40465
40465
  result.push(tab + "\"compilerOptions\": {");
40466
- result.push("" + tab + tab + "/* " + ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file) + " */");
40466
+ result.push("" + tab + tab + "/* " + ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file) + " */");
40467
40467
  result.push("");
40468
40468
  // Print out each row, aligning all the descriptions on the same column.
40469
40469
  for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
@@ -62995,10 +62995,6 @@ var ts;
62995
62995
  if (sourceRestType || targetRestType) {
62996
62996
  void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers);
62997
62997
  }
62998
- if (sourceRestType && targetRestType && sourceCount !== targetCount) {
62999
- // We're not able to relate misaligned complex rest parameters
63000
- return 0 /* False */;
63001
- }
63002
62998
  var kind = target.declaration ? target.declaration.kind : 0 /* Unknown */;
63003
62999
  var strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 168 /* MethodDeclaration */ &&
63004
63000
  kind !== 167 /* MethodSignature */ && kind !== 170 /* Constructor */;
@@ -70056,7 +70052,7 @@ var ts;
70056
70052
  var substituteConstraints = !(checkMode && checkMode & 2 /* Inferential */) &&
70057
70053
  someType(type, isGenericTypeWithUnionConstraint) &&
70058
70054
  (isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode));
70059
- return substituteConstraints ? mapType(type, function (t) { return t.flags & 465829888 /* Instantiable */ && !isMappedTypeGenericIndexedAccess(t) ? getBaseConstraintOrType(t) : t; }) : type;
70055
+ return substituteConstraints ? mapType(type, function (t) { return t.flags & 465829888 /* Instantiable */ ? getBaseConstraintOrType(t) : t; }) : type;
70060
70056
  }
70061
70057
  function isExportOrExportExpression(location) {
70062
70058
  return !!ts.findAncestor(location, function (n) {
@@ -77377,7 +77373,7 @@ var ts;
77377
77373
  if (operator === 55 /* AmpersandAmpersandToken */ || operator === 56 /* BarBarToken */ || operator === 60 /* QuestionQuestionToken */) {
77378
77374
  if (operator === 55 /* AmpersandAmpersandToken */) {
77379
77375
  var parent = ts.walkUpParenthesizedExpressions(node.parent);
77380
- checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, ts.isIfStatement(parent) ? parent.thenStatement : undefined);
77376
+ checkTestingKnownTruthyCallableOrAwaitableType(node.left, ts.isIfStatement(parent) ? parent.thenStatement : undefined);
77381
77377
  }
77382
77378
  checkTruthinessOfType(leftType, node.left);
77383
77379
  }
@@ -77884,8 +77880,8 @@ var ts;
77884
77880
  return type;
77885
77881
  }
77886
77882
  function checkConditionalExpression(node, checkMode) {
77887
- var type = checkTruthinessExpression(node.condition);
77888
- checkTestingKnownTruthyCallableOrAwaitableType(node.condition, type, node.whenTrue);
77883
+ checkTruthinessExpression(node.condition);
77884
+ checkTestingKnownTruthyCallableOrAwaitableType(node.condition, node.whenTrue);
77889
77885
  var type1 = checkExpression(node.whenTrue, checkMode);
77890
77886
  var type2 = checkExpression(node.whenFalse, checkMode);
77891
77887
  return getUnionType([type1, type2], 2 /* Subtype */);
@@ -81041,50 +81037,59 @@ var ts;
81041
81037
  function checkIfStatement(node) {
81042
81038
  // Grammar checking
81043
81039
  checkGrammarStatementInAmbientContext(node);
81044
- var type = checkTruthinessExpression(node.expression);
81045
- checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement);
81040
+ checkTruthinessExpression(node.expression);
81041
+ checkTestingKnownTruthyCallableOrAwaitableType(node.expression, node.thenStatement);
81046
81042
  checkSourceElement(node.thenStatement);
81047
81043
  if (node.thenStatement.kind === 235 /* EmptyStatement */) {
81048
81044
  error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement);
81049
81045
  }
81050
81046
  checkSourceElement(node.elseStatement);
81051
81047
  }
81052
- function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, type, body) {
81048
+ function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, body) {
81053
81049
  if (!strictNullChecks)
81054
81050
  return;
81055
- if (getFalsyFlags(type))
81056
- return;
81057
- var location = ts.isBinaryExpression(condExpr) ? condExpr.right : condExpr;
81058
- if (ts.isPropertyAccessExpression(location) && isTypeAssertion(location.expression)) {
81059
- return;
81060
- }
81061
- var testedNode = ts.isIdentifier(location) ? location
81062
- : ts.isPropertyAccessExpression(location) ? location.name
81063
- : ts.isBinaryExpression(location) && ts.isIdentifier(location.right) ? location.right
81064
- : undefined;
81065
- // While it technically should be invalid for any known-truthy value
81066
- // to be tested, we de-scope to functions and Promises unreferenced in
81067
- // the block as a heuristic to identify the most common bugs. There
81068
- // are too many false positives for values sourced from type
81069
- // definitions without strictNullChecks otherwise.
81070
- var callSignatures = getSignaturesOfType(type, 0 /* Call */);
81071
- var isPromise = !!getAwaitedTypeOfPromise(type);
81072
- if (callSignatures.length === 0 && !isPromise) {
81073
- return;
81074
- }
81075
- var testedSymbol = testedNode && getSymbolAtLocation(testedNode);
81076
- if (!testedSymbol && !isPromise) {
81077
- return;
81078
- }
81079
- var isUsed = testedSymbol && ts.isBinaryExpression(condExpr.parent) && isSymbolUsedInBinaryExpressionChain(condExpr.parent, testedSymbol)
81080
- || testedSymbol && body && isSymbolUsedInConditionBody(condExpr, body, testedNode, testedSymbol);
81081
- if (!isUsed) {
81082
- if (isPromise) {
81083
- errorAndMaybeSuggestAwait(location,
81084
- /*maybeMissingAwait*/ true, ts.Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined, getTypeNameForErrorDisplay(type));
81051
+ helper(condExpr, body);
81052
+ while (ts.isBinaryExpression(condExpr) && condExpr.operatorToken.kind === 56 /* BarBarToken */) {
81053
+ condExpr = condExpr.left;
81054
+ helper(condExpr, body);
81055
+ }
81056
+ function helper(condExpr, body) {
81057
+ var location = ts.isBinaryExpression(condExpr) &&
81058
+ (condExpr.operatorToken.kind === 56 /* BarBarToken */ || condExpr.operatorToken.kind === 55 /* AmpersandAmpersandToken */)
81059
+ ? condExpr.right
81060
+ : condExpr;
81061
+ var type = checkTruthinessExpression(location);
81062
+ var isPropertyExpressionCast = ts.isPropertyAccessExpression(location) && isTypeAssertion(location.expression);
81063
+ if (getFalsyFlags(type) || isPropertyExpressionCast)
81064
+ return;
81065
+ // While it technically should be invalid for any known-truthy value
81066
+ // to be tested, we de-scope to functions and Promises unreferenced in
81067
+ // the block as a heuristic to identify the most common bugs. There
81068
+ // are too many false positives for values sourced from type
81069
+ // definitions without strictNullChecks otherwise.
81070
+ var callSignatures = getSignaturesOfType(type, 0 /* Call */);
81071
+ var isPromise = !!getAwaitedTypeOfPromise(type);
81072
+ if (callSignatures.length === 0 && !isPromise) {
81073
+ return;
81085
81074
  }
81086
- else {
81087
- error(location, ts.Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead);
81075
+ var testedNode = ts.isIdentifier(location) ? location
81076
+ : ts.isPropertyAccessExpression(location) ? location.name
81077
+ : ts.isBinaryExpression(location) && ts.isIdentifier(location.right) ? location.right
81078
+ : undefined;
81079
+ var testedSymbol = testedNode && getSymbolAtLocation(testedNode);
81080
+ if (!testedSymbol && !isPromise) {
81081
+ return;
81082
+ }
81083
+ var isUsed = testedSymbol && ts.isBinaryExpression(condExpr.parent) && isSymbolUsedInBinaryExpressionChain(condExpr.parent, testedSymbol)
81084
+ || testedSymbol && body && isSymbolUsedInConditionBody(condExpr, body, testedNode, testedSymbol);
81085
+ if (!isUsed) {
81086
+ if (isPromise) {
81087
+ errorAndMaybeSuggestAwait(location,
81088
+ /*maybeMissingAwait*/ true, ts.Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined, getTypeNameForErrorDisplay(type));
81089
+ }
81090
+ else {
81091
+ error(location, ts.Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead);
81092
+ }
81088
81093
  }
81089
81094
  }
81090
81095
  }
@@ -82273,9 +82278,9 @@ var ts;
82273
82278
  var containsArguments = containsArgumentsReference(node);
82274
82279
  if (containsArguments) {
82275
82280
  var lastJSDocParam = ts.lastOrUndefined(jsdocParameters);
82276
- if (lastJSDocParam && ts.isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression &&
82281
+ if (isJs && lastJSDocParam && ts.isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression &&
82277
82282
  lastJSDocParam.typeExpression.type && !parameters.has(lastJSDocParam.name.escapedText) && !isArrayType(getTypeFromTypeNode(lastJSDocParam.typeExpression.type))) {
82278
- errorOrSuggestion(isJs, lastJSDocParam.name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, ts.idText(lastJSDocParam.name));
82283
+ error(lastJSDocParam.name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, ts.idText(lastJSDocParam.name));
82279
82284
  }
82280
82285
  }
82281
82286
  else {
@@ -82285,7 +82290,9 @@ var ts;
82285
82290
  return;
82286
82291
  }
82287
82292
  if (ts.isQualifiedName(name)) {
82288
- errorOrSuggestion(isJs, name, ts.Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, ts.entityNameToString(name), ts.entityNameToString(name.left));
82293
+ if (isJs) {
82294
+ error(name, ts.Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, ts.entityNameToString(name), ts.entityNameToString(name.left));
82295
+ }
82289
82296
  }
82290
82297
  else {
82291
82298
  errorOrSuggestion(isJs, name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, ts.idText(name));
@@ -83878,10 +83885,10 @@ var ts;
83878
83885
  }
83879
83886
  // ECMA262: 15.2.1.1 It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries.
83880
83887
  // (TS Exceptions: namespaces, function overloads, enums, and interfaces)
83881
- if (flags & (1920 /* Namespace */ | 64 /* Interface */ | 384 /* Enum */)) {
83888
+ if (flags & (1920 /* Namespace */ | 384 /* Enum */)) {
83882
83889
  return;
83883
83890
  }
83884
- var exportedDeclarationsCount = ts.countWhere(declarations, isNotOverloadAndNotAccessor);
83891
+ var exportedDeclarationsCount = ts.countWhere(declarations, ts.and(isNotOverloadAndNotAccessor, ts.not(ts.isInterfaceDeclaration)));
83885
83892
  if (flags & 524288 /* TypeAlias */ && exportedDeclarationsCount <= 2) {
83886
83893
  // it is legal to merge type alias with other values
83887
83894
  // so count should be either 1 (just type alias) or 2 (type alias + merged value)
@@ -126173,14 +126180,15 @@ var ts;
126173
126180
  : "linkplain";
126174
126181
  var parts = [linkPart("{@" + prefix + " ")];
126175
126182
  if (!link.name) {
126176
- if (link.text)
126183
+ if (link.text) {
126177
126184
  parts.push(linkTextPart(link.text));
126185
+ }
126178
126186
  }
126179
126187
  else {
126180
126188
  var symbol = checker === null || checker === void 0 ? void 0 : checker.getSymbolAtLocation(link.name);
126181
126189
  var suffix = findLinkNameEnd(link.text);
126182
126190
  var name = ts.getTextOfNode(link.name) + link.text.slice(0, suffix);
126183
- var text = link.text.slice(suffix);
126191
+ var text = skipSeparatorFromLinkText(link.text.slice(suffix));
126184
126192
  var decl = (symbol === null || symbol === void 0 ? void 0 : symbol.valueDeclaration) || ((_a = symbol === null || symbol === void 0 ? void 0 : symbol.declarations) === null || _a === void 0 ? void 0 : _a[0]);
126185
126193
  if (decl) {
126186
126194
  parts.push(linkNamePart(name, decl));
@@ -126195,6 +126203,15 @@ var ts;
126195
126203
  return parts;
126196
126204
  }
126197
126205
  ts.buildLinkParts = buildLinkParts;
126206
+ function skipSeparatorFromLinkText(text) {
126207
+ var pos = 0;
126208
+ if (text.charCodeAt(pos++) === 124 /* bar */) {
126209
+ while (pos < text.length && text.charCodeAt(pos) === 32 /* space */)
126210
+ pos++;
126211
+ return text.slice(pos);
126212
+ }
126213
+ return text;
126214
+ }
126198
126215
  function findLinkNameEnd(text) {
126199
126216
  if (text.indexOf("()") === 0)
126200
126217
  return 2;
@@ -137431,9 +137448,18 @@ var ts;
137431
137448
  JsDoc.getJsDocTagsFromDeclarations = getJsDocTagsFromDeclarations;
137432
137449
  function getDisplayPartsFromComment(comment, checker) {
137433
137450
  if (typeof comment === "string") {
137434
- return [ts.textPart(comment)];
137451
+ return [ts.textPart(skipSeparatorFromComment(comment))];
137435
137452
  }
137436
- return ts.flatMap(comment, function (node) { return node.kind === 319 /* JSDocText */ ? [ts.textPart(node.text)] : ts.buildLinkParts(node, checker); });
137453
+ return ts.flatMap(comment, function (node) { return node.kind === 319 /* JSDocText */ ? [ts.textPart(skipSeparatorFromComment(node.text))] : ts.buildLinkParts(node, checker); });
137454
+ }
137455
+ function skipSeparatorFromComment(text) {
137456
+ var pos = 0;
137457
+ if (text.charCodeAt(pos++) === 45 /* minus */) {
137458
+ while (pos < text.length && text.charCodeAt(pos) === 32 /* space */)
137459
+ pos++;
137460
+ return text.slice(pos);
137461
+ }
137462
+ return text;
137437
137463
  }
137438
137464
  function getCommentDisplayParts(tag, checker) {
137439
137465
  var comment = tag.comment, kind = tag.kind;
@@ -154811,7 +154837,7 @@ var ts;
154811
154837
  /*dotDotDotToken*/ undefined,
154812
154838
  /*name*/ names && names[i] || "arg" + i,
154813
154839
  /*questionToken*/ minArgumentCount !== undefined && i >= minArgumentCount ? ts.factory.createToken(57 /* QuestionToken */) : undefined,
154814
- /*type*/ inJs ? undefined : types && types[i] || ts.factory.createKeywordTypeNode(130 /* AnyKeyword */),
154840
+ /*type*/ inJs ? undefined : types && types[i] || ts.factory.createKeywordTypeNode(154 /* UnknownKeyword */),
154815
154841
  /*initializer*/ undefined);
154816
154842
  parameters.push(newParameter);
154817
154843
  }
@@ -154839,11 +154865,10 @@ var ts;
154839
154865
  var maxArgsParameterSymbolNames = maxArgsSignature.parameters.map(function (symbol) { return symbol.name; });
154840
154866
  var parameters = createDummyParameters(maxNonRestArgs, maxArgsParameterSymbolNames, /* types */ undefined, minArgumentCount, /*inJs*/ false);
154841
154867
  if (someSigHasRestParameter) {
154842
- var anyArrayType = ts.factory.createArrayTypeNode(ts.factory.createKeywordTypeNode(130 /* AnyKeyword */));
154843
154868
  var restParameter = ts.factory.createParameterDeclaration(
154844
154869
  /*decorators*/ undefined,
154845
154870
  /*modifiers*/ undefined, ts.factory.createToken(25 /* DotDotDotToken */), maxArgsParameterSymbolNames[maxNonRestArgs] || "rest",
154846
- /*questionToken*/ maxNonRestArgs >= minArgumentCount ? ts.factory.createToken(57 /* QuestionToken */) : undefined, anyArrayType,
154871
+ /*questionToken*/ maxNonRestArgs >= minArgumentCount ? ts.factory.createToken(57 /* QuestionToken */) : undefined, ts.factory.createArrayTypeNode(ts.factory.createKeywordTypeNode(154 /* UnknownKeyword */)),
154847
154872
  /*initializer*/ undefined);
154848
154873
  parameters.push(restParameter);
154849
154874
  }
@@ -157212,7 +157237,7 @@ var ts;
157212
157237
  ts.Debug.assert(nodeToCheck.pos <= nodeToCheck.end, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (1)");
157213
157238
  // For understanding how skipTrivia functioned:
157214
157239
  ts.Debug.assert(!ts.positionIsSynthesized(nodeToCheck.pos), "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (2)");
157215
- if (!ts.isStatement(nodeToCheck) && !(ts.isExpressionNode(nodeToCheck) && isExtractableExpression(nodeToCheck))) {
157240
+ if (!ts.isStatement(nodeToCheck) && !(ts.isExpressionNode(nodeToCheck) && isExtractableExpression(nodeToCheck)) && !isStringLiteralJsxAttribute(nodeToCheck)) {
157216
157241
  return [ts.createDiagnosticForNode(nodeToCheck, Messages.statementOrExpressionExpected)];
157217
157242
  }
157218
157243
  if (nodeToCheck.flags & 8388608 /* Ambient */) {
@@ -157392,13 +157417,16 @@ var ts;
157392
157417
  if (ts.isStatement(node)) {
157393
157418
  return [node];
157394
157419
  }
157395
- else if (ts.isExpressionNode(node)) {
157420
+ if (ts.isExpressionNode(node)) {
157396
157421
  // If our selection is the expression in an ExpressionStatement, expand
157397
157422
  // the selection to include the enclosing Statement (this stops us
157398
157423
  // from trying to care about the return value of the extracted function
157399
157424
  // and eliminates double semicolon insertion in certain scenarios)
157400
157425
  return ts.isExpressionStatement(node.parent) ? [node.parent] : node;
157401
157426
  }
157427
+ if (isStringLiteralJsxAttribute(node)) {
157428
+ return node;
157429
+ }
157402
157430
  return undefined;
157403
157431
  }
157404
157432
  function isScope(node) {
@@ -158208,7 +158236,7 @@ var ts;
158208
158236
  // Unfortunately, this code takes advantage of the knowledge that the generated method
158209
158237
  // will use the contextual type of an expression as the return type of the extracted
158210
158238
  // method (and will therefore "use" all the types involved).
158211
- if (inGenericContext && !isReadonlyArray(targetRange.range)) {
158239
+ if (inGenericContext && !isReadonlyArray(targetRange.range) && !ts.isJsxAttribute(targetRange.range)) {
158212
158240
  var contextualType = checker.getContextualType(targetRange.range); // TODO: GH#18217
158213
158241
  recordTypeParameterUsages(contextualType);
158214
158242
  }
@@ -158533,7 +158561,11 @@ var ts;
158533
158561
  }
158534
158562
  }
158535
158563
  function isInJSXContent(node) {
158536
- return (ts.isJsxElement(node) || ts.isJsxSelfClosingElement(node) || ts.isJsxFragment(node)) && (ts.isJsxElement(node.parent) || ts.isJsxFragment(node.parent));
158564
+ return isStringLiteralJsxAttribute(node) ||
158565
+ (ts.isJsxElement(node) || ts.isJsxSelfClosingElement(node) || ts.isJsxFragment(node)) && (ts.isJsxElement(node.parent) || ts.isJsxFragment(node.parent));
158566
+ }
158567
+ function isStringLiteralJsxAttribute(node) {
158568
+ return ts.isStringLiteral(node) && node.parent && ts.isJsxAttribute(node.parent);
158537
158569
  }
158538
158570
  })(extractSymbol = refactor.extractSymbol || (refactor.extractSymbol = {}));
158539
158571
  })(refactor = ts.refactor || (ts.refactor = {}));
@@ -177040,6 +177072,7 @@ var ts;
177040
177072
  })(server = ts.server || (ts.server = {}));
177041
177073
  })(ts || (ts = {}));
177042
177074
  /*@internal*/
177075
+ /// <reference lib="webworker" />
177043
177076
  var ts;
177044
177077
  (function (ts) {
177045
177078
  var server;
@@ -177121,7 +177154,7 @@ var ts;
177121
177154
  }
177122
177155
  }
177123
177156
  function hrtime(previous) {
177124
- var now = self.performance.now(ts.performance) * 1e-3;
177157
+ var now = self.performance.now() * 1e-3;
177125
177158
  var seconds = Math.floor(now);
177126
177159
  var nanoseconds = Math.floor((now % 1) * 1e9);
177127
177160
  if (previous) {
@@ -177143,7 +177176,7 @@ var ts;
177143
177176
  WorkerSession.prototype.exit = function () {
177144
177177
  this.logger.info("Exiting...");
177145
177178
  this.projectService.closeLog();
177146
- close(0);
177179
+ close();
177147
177180
  };
177148
177181
  WorkerSession.prototype.listen = function () {
177149
177182
  var _this = this;
@@ -177174,9 +177207,9 @@ var ts;
177174
177207
  function getLogLevel(level) {
177175
177208
  if (level) {
177176
177209
  var l = level.toLowerCase();
177177
- for (var name in server.LogLevel) {
177178
- if (isNaN(+name) && l === name.toLowerCase()) {
177179
- return server.LogLevel[name];
177210
+ for (var name_1 in server.LogLevel) {
177211
+ if (isNaN(+name_1) && l === name_1.toLowerCase()) {
177212
+ return server.LogLevel[name_1];
177180
177213
  }
177181
177214
  }
177182
177215
  }