@typescript-deploys/pr-build 5.3.0-pr-55442-5 → 5.3.0-pr-54647-9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.3";
21
- var version = `${versionMajorMinor}.0-insiders.20230829`;
21
+ var version = `${versionMajorMinor}.0-insiders.20230830`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -7688,7 +7688,7 @@ var Diagnostics = {
7688
7688
  Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
7689
7689
  Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
7690
7690
  Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
7691
- Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"),
7691
+ Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"),
7692
7692
  Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
7693
7693
  Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
7694
7694
  Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
@@ -48232,28 +48232,6 @@ function createTypeChecker(host) {
48232
48232
  const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context);
48233
48233
  context.enclosingDeclaration = saveEnclosingDeclaration;
48234
48234
  context.approximateLength += symbolName(propertySymbol).length + 1;
48235
- if (propertySymbol.flags & 98304 /* Accessor */) {
48236
- const writeType = getWriteTypeOfSymbol(propertySymbol);
48237
- if (propertyType !== writeType) {
48238
- const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
48239
- const getterSignature = getSignatureFromDeclaration(getterDeclaration);
48240
- typeElements.push(
48241
- setCommentRange(
48242
- signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
48243
- getterDeclaration
48244
- )
48245
- );
48246
- const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */);
48247
- const setterSignature = getSignatureFromDeclaration(setterDeclaration);
48248
- typeElements.push(
48249
- setCommentRange(
48250
- signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
48251
- setterDeclaration
48252
- )
48253
- );
48254
- return;
48255
- }
48256
- }
48257
48235
  const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0;
48258
48236
  if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) {
48259
48237
  const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */);
@@ -48291,9 +48269,9 @@ function createTypeChecker(host) {
48291
48269
  typeElements.push(preserveCommentsOn(propertySignature));
48292
48270
  function preserveCommentsOn(node) {
48293
48271
  var _a2;
48294
- const jsdocPropertyTag = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 355 /* JSDocPropertyTag */);
48295
- if (jsdocPropertyTag) {
48296
- const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment);
48272
+ if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) {
48273
+ const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 355 /* JSDocPropertyTag */);
48274
+ const commentText = getTextOfJSDocComment(d.comment);
48297
48275
  if (commentText) {
48298
48276
  setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
48299
48277
  }
@@ -50593,15 +50571,7 @@ function createTypeChecker(host) {
50593
50571
  const ctxSrc = getSourceFileOfNode(context.enclosingDeclaration);
50594
50572
  return getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !length(getIndexInfosOfType(typeToSerialize)) && !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class
50595
50573
  !!(length(filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK
50596
- !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => {
50597
- if (!isIdentifierText(symbolName(p), languageVersion)) {
50598
- return false;
50599
- }
50600
- if (!(p.flags & 98304 /* Accessor */)) {
50601
- return true;
50602
- }
50603
- return getNonMissingTypeOfSymbol(p) === getWriteTypeOfSymbol(p);
50604
- });
50574
+ !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => isIdentifierText(symbolName(p), languageVersion));
50605
50575
  }
50606
50576
  function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) {
50607
50577
  return function serializePropertySymbol(p, isStatic2, baseType) {
@@ -54463,7 +54433,8 @@ function createTypeChecker(host) {
54463
54433
  const writeType = getWriteTypeOfSymbol(prop);
54464
54434
  if (writeTypes || writeType !== type) {
54465
54435
  writeTypes = append(!writeTypes ? propTypes.slice() : writeTypes, writeType);
54466
- } else if (type !== firstType) {
54436
+ }
54437
+ if (type !== firstType) {
54467
54438
  checkFlags |= 64 /* HasNonUniformType */;
54468
54439
  }
54469
54440
  if (isLiteralType(type) || isPatternLiteralType(type)) {
package/lib/tsserver.js CHANGED
@@ -2327,7 +2327,7 @@ module.exports = __toCommonJS(server_exports);
2327
2327
 
2328
2328
  // src/compiler/corePublic.ts
2329
2329
  var versionMajorMinor = "5.3";
2330
- var version = `${versionMajorMinor}.0-insiders.20230829`;
2330
+ var version = `${versionMajorMinor}.0-insiders.20230830`;
2331
2331
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2332
2332
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2333
2333
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -11207,7 +11207,7 @@ var Diagnostics = {
11207
11207
  Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
11208
11208
  Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
11209
11209
  Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
11210
- Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"),
11210
+ Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"),
11211
11211
  Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
11212
11212
  Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
11213
11213
  Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
@@ -52934,28 +52934,6 @@ function createTypeChecker(host) {
52934
52934
  const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context);
52935
52935
  context.enclosingDeclaration = saveEnclosingDeclaration;
52936
52936
  context.approximateLength += symbolName(propertySymbol).length + 1;
52937
- if (propertySymbol.flags & 98304 /* Accessor */) {
52938
- const writeType = getWriteTypeOfSymbol(propertySymbol);
52939
- if (propertyType !== writeType) {
52940
- const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
52941
- const getterSignature = getSignatureFromDeclaration(getterDeclaration);
52942
- typeElements.push(
52943
- setCommentRange(
52944
- signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
52945
- getterDeclaration
52946
- )
52947
- );
52948
- const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */);
52949
- const setterSignature = getSignatureFromDeclaration(setterDeclaration);
52950
- typeElements.push(
52951
- setCommentRange(
52952
- signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
52953
- setterDeclaration
52954
- )
52955
- );
52956
- return;
52957
- }
52958
- }
52959
52937
  const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0;
52960
52938
  if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) {
52961
52939
  const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */);
@@ -52993,9 +52971,9 @@ function createTypeChecker(host) {
52993
52971
  typeElements.push(preserveCommentsOn(propertySignature));
52994
52972
  function preserveCommentsOn(node) {
52995
52973
  var _a2;
52996
- const jsdocPropertyTag = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 355 /* JSDocPropertyTag */);
52997
- if (jsdocPropertyTag) {
52998
- const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment);
52974
+ if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) {
52975
+ const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 355 /* JSDocPropertyTag */);
52976
+ const commentText = getTextOfJSDocComment(d.comment);
52999
52977
  if (commentText) {
53000
52978
  setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
53001
52979
  }
@@ -55295,15 +55273,7 @@ function createTypeChecker(host) {
55295
55273
  const ctxSrc = getSourceFileOfNode(context.enclosingDeclaration);
55296
55274
  return getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !length(getIndexInfosOfType(typeToSerialize)) && !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class
55297
55275
  !!(length(filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK
55298
- !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => {
55299
- if (!isIdentifierText(symbolName(p), languageVersion)) {
55300
- return false;
55301
- }
55302
- if (!(p.flags & 98304 /* Accessor */)) {
55303
- return true;
55304
- }
55305
- return getNonMissingTypeOfSymbol(p) === getWriteTypeOfSymbol(p);
55306
- });
55276
+ !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => isIdentifierText(symbolName(p), languageVersion));
55307
55277
  }
55308
55278
  function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) {
55309
55279
  return function serializePropertySymbol(p, isStatic2, baseType) {
@@ -59165,7 +59135,8 @@ function createTypeChecker(host) {
59165
59135
  const writeType = getWriteTypeOfSymbol(prop);
59166
59136
  if (writeTypes || writeType !== type) {
59167
59137
  writeTypes = append(!writeTypes ? propTypes.slice() : writeTypes, writeType);
59168
- } else if (type !== firstType) {
59138
+ }
59139
+ if (type !== firstType) {
59169
59140
  checkFlags |= 64 /* HasNonUniformType */;
59170
59141
  }
59171
59142
  if (isLiteralType(type) || isPatternLiteralType(type)) {
@@ -140436,12 +140407,16 @@ function getRefactorActionsToConvertToTemplateString(context) {
140436
140407
  const { file, startPosition } = context;
140437
140408
  const node = getNodeOrParentOfParentheses(file, startPosition);
140438
140409
  const maybeBinary = getParentBinaryExpression(node);
140410
+ const nodeIsStringLiteral = isStringLiteral(maybeBinary);
140439
140411
  const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
140440
- if (isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) {
140412
+ if (nodeIsStringLiteral && context.triggerReason !== "invoked") {
140413
+ return emptyArray;
140414
+ }
140415
+ if (isExpressionNode(maybeBinary) && (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation)) {
140441
140416
  refactorInfo.actions.push(convertStringAction);
140442
140417
  return [refactorInfo];
140443
140418
  } else if (context.preferences.provideRefactorNotApplicableReason) {
140444
- refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation) });
140419
+ refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenations_and_string_literals) });
140445
140420
  return [refactorInfo];
140446
140421
  }
140447
140422
  return emptyArray;
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.3";
38
- version = `${versionMajorMinor}.0-insiders.20230829`;
38
+ version = `${versionMajorMinor}.0-insiders.20230830`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -8990,7 +8990,7 @@ ${lanes.join("\n")}
8990
8990
  Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
8991
8991
  Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
8992
8992
  Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
8993
- Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"),
8993
+ Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"),
8994
8994
  Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
8995
8995
  Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
8996
8996
  Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
@@ -50701,28 +50701,6 @@ ${lanes.join("\n")}
50701
50701
  const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context);
50702
50702
  context.enclosingDeclaration = saveEnclosingDeclaration;
50703
50703
  context.approximateLength += symbolName(propertySymbol).length + 1;
50704
- if (propertySymbol.flags & 98304 /* Accessor */) {
50705
- const writeType = getWriteTypeOfSymbol(propertySymbol);
50706
- if (propertyType !== writeType) {
50707
- const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
50708
- const getterSignature = getSignatureFromDeclaration(getterDeclaration);
50709
- typeElements.push(
50710
- setCommentRange(
50711
- signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }),
50712
- getterDeclaration
50713
- )
50714
- );
50715
- const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */);
50716
- const setterSignature = getSignatureFromDeclaration(setterDeclaration);
50717
- typeElements.push(
50718
- setCommentRange(
50719
- signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }),
50720
- setterDeclaration
50721
- )
50722
- );
50723
- return;
50724
- }
50725
- }
50726
50704
  const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0;
50727
50705
  if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) {
50728
50706
  const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */);
@@ -50760,9 +50738,9 @@ ${lanes.join("\n")}
50760
50738
  typeElements.push(preserveCommentsOn(propertySignature));
50761
50739
  function preserveCommentsOn(node) {
50762
50740
  var _a2;
50763
- const jsdocPropertyTag = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 355 /* JSDocPropertyTag */);
50764
- if (jsdocPropertyTag) {
50765
- const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment);
50741
+ if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) {
50742
+ const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 355 /* JSDocPropertyTag */);
50743
+ const commentText = getTextOfJSDocComment(d.comment);
50766
50744
  if (commentText) {
50767
50745
  setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
50768
50746
  }
@@ -53062,15 +53040,7 @@ ${lanes.join("\n")}
53062
53040
  const ctxSrc = getSourceFileOfNode(context.enclosingDeclaration);
53063
53041
  return getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !length(getIndexInfosOfType(typeToSerialize)) && !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class
53064
53042
  !!(length(filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK
53065
- !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => {
53066
- if (!isIdentifierText(symbolName(p), languageVersion)) {
53067
- return false;
53068
- }
53069
- if (!(p.flags & 98304 /* Accessor */)) {
53070
- return true;
53071
- }
53072
- return getNonMissingTypeOfSymbol(p) === getWriteTypeOfSymbol(p);
53073
- });
53043
+ !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => isIdentifierText(symbolName(p), languageVersion));
53074
53044
  }
53075
53045
  function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) {
53076
53046
  return function serializePropertySymbol(p, isStatic2, baseType) {
@@ -56932,7 +56902,8 @@ ${lanes.join("\n")}
56932
56902
  const writeType = getWriteTypeOfSymbol(prop);
56933
56903
  if (writeTypes || writeType !== type) {
56934
56904
  writeTypes = append(!writeTypes ? propTypes.slice() : writeTypes, writeType);
56935
- } else if (type !== firstType) {
56905
+ }
56906
+ if (type !== firstType) {
56936
56907
  checkFlags |= 64 /* HasNonUniformType */;
56937
56908
  }
56938
56909
  if (isLiteralType(type) || isPatternLiteralType(type)) {
@@ -138898,12 +138869,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
138898
138869
  const { file, startPosition } = context;
138899
138870
  const node = getNodeOrParentOfParentheses(file, startPosition);
138900
138871
  const maybeBinary = getParentBinaryExpression(node);
138872
+ const nodeIsStringLiteral = isStringLiteral(maybeBinary);
138901
138873
  const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] };
138902
- if (isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) {
138874
+ if (nodeIsStringLiteral && context.triggerReason !== "invoked") {
138875
+ return emptyArray;
138876
+ }
138877
+ if (isExpressionNode(maybeBinary) && (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation)) {
138903
138878
  refactorInfo.actions.push(convertStringAction);
138904
138879
  return [refactorInfo];
138905
138880
  } else if (context.preferences.provideRefactorNotApplicableReason) {
138906
- refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation) });
138881
+ refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenations_and_string_literals) });
138907
138882
  return [refactorInfo];
138908
138883
  }
138909
138884
  return emptyArray;
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.3";
57
- var version = `${versionMajorMinor}.0-insiders.20230829`;
57
+ var version = `${versionMajorMinor}.0-insiders.20230830`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -7065,7 +7065,7 @@ var Diagnostics = {
7065
7065
  Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"),
7066
7066
  Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"),
7067
7067
  Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"),
7068
- Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"),
7068
+ Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"),
7069
7069
  Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"),
7070
7070
  Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"),
7071
7071
  Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.3.0-pr-55442-5",
5
+ "version": "5.3.0-pr-54647-9",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -113,5 +113,5 @@
113
113
  "node": "20.1.0",
114
114
  "npm": "8.19.4"
115
115
  },
116
- "gitHead": "e1fab87e45f6de3db89d9ba0334759fe01aee535"
116
+ "gitHead": "130952dca545d5f8d12a02fe7260d80874d37ad1"
117
117
  }