@typescript-deploys/pr-build 5.2.0-pr-52095-19 → 5.2.0-pr-55214-6

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/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.2";
38
- version = `${versionMajorMinor}.0-insiders.20230726`;
38
+ version = `${versionMajorMinor}.0-insiders.20230731`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -1646,7 +1646,7 @@ var ts = (() => {
1646
1646
  return void 0;
1647
1647
  };
1648
1648
  hasOwnProperty = Object.prototype.hasOwnProperty;
1649
- fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g;
1649
+ fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g;
1650
1650
  AssertionLevel = /* @__PURE__ */ ((AssertionLevel2) => {
1651
1651
  AssertionLevel2[AssertionLevel2["None"] = 0] = "None";
1652
1652
  AssertionLevel2[AssertionLevel2["Normal"] = 1] = "Normal";
@@ -1951,7 +1951,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1951
1951
  return func.name;
1952
1952
  } else {
1953
1953
  const text = Function.prototype.toString.call(func);
1954
- const match = /^function\s+([\w\$]+)\s*\(/.exec(text);
1954
+ const match = /^function\s+([\w$]+)\s*\(/.exec(text);
1955
1955
  return match ? match[1] : "";
1956
1956
  }
1957
1957
  }
@@ -2936,7 +2936,7 @@ ${lanes.join("\n")}
2936
2936
  "src/compiler/semver.ts"() {
2937
2937
  "use strict";
2938
2938
  init_ts2();
2939
- versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i;
2939
+ versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i;
2940
2940
  prereleaseRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i;
2941
2941
  prereleasePartRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i;
2942
2942
  buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i;
@@ -11522,7 +11522,7 @@ ${lanes.join("\n")}
11522
11522
  }
11523
11523
  function validateLocaleAndSetLanguage(locale, sys2, errors) {
11524
11524
  const lowerCaseLocale = locale.toLowerCase();
11525
- const matchResult = /^([a-z]+)([_\-]([a-z]+))?$/.exec(lowerCaseLocale);
11525
+ const matchResult = /^([a-z]+)([_-]([a-z]+))?$/.exec(lowerCaseLocale);
11526
11526
  if (!matchResult) {
11527
11527
  if (errors) {
11528
11528
  errors.push(createCompilerDiagnostic(Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp"));
@@ -16738,6 +16738,12 @@ ${lanes.join("\n")}
16738
16738
  function isThisIdentifier(node) {
16739
16739
  return !!node && node.kind === 80 /* Identifier */ && identifierIsThisKeyword(node);
16740
16740
  }
16741
+ function isInTypeQuery(node) {
16742
+ return !!findAncestor(
16743
+ node,
16744
+ (n) => n.kind === 186 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 166 /* QualifiedName */ ? false : "quit"
16745
+ );
16746
+ }
16741
16747
  function isThisInTypeQuery(node) {
16742
16748
  if (!isThisIdentifier(node)) {
16743
16749
  return false;
@@ -18219,6 +18225,9 @@ ${lanes.join("\n")}
18219
18225
  function getUseDefineForClassFields(compilerOptions) {
18220
18226
  return compilerOptions.useDefineForClassFields === void 0 ? getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */ : compilerOptions.useDefineForClassFields;
18221
18227
  }
18228
+ function getEmitStandardClassFields(compilerOptions) {
18229
+ return compilerOptions.useDefineForClassFields !== false && getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */;
18230
+ }
18222
18231
  function compilerOptionsAffectSemanticDiagnostics(newOptions, oldOptions) {
18223
18232
  return optionsHaveChanges(oldOptions, newOptions, semanticDiagnosticsOptionDeclarations);
18224
18233
  }
@@ -19310,9 +19319,9 @@ ${lanes.join("\n")}
19310
19319
  return OperatorPrecedence2;
19311
19320
  })(OperatorPrecedence || {});
19312
19321
  templateSubstitutionRegExp = /\$\{/g;
19313
- doubleQuoteEscapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
19314
- singleQuoteEscapedCharsRegExp = /[\\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
19315
- backtickQuoteEscapedCharsRegExp = /\r\n|[\\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g;
19322
+ doubleQuoteEscapedCharsRegExp = /[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
19323
+ singleQuoteEscapedCharsRegExp = /[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
19324
+ backtickQuoteEscapedCharsRegExp = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g;
19316
19325
  escapedCharsMap = new Map(Object.entries({
19317
19326
  " ": "\\t",
19318
19327
  "\v": "\\v",
@@ -19334,8 +19343,8 @@ ${lanes.join("\n")}
19334
19343
  // special case for CRLFs in backticks
19335
19344
  }));
19336
19345
  nonAsciiCharacters = /[^\u0000-\u007F]/g;
19337
- jsxDoubleQuoteEscapedCharsRegExp = /[\"\u0000-\u001f\u2028\u2029\u0085]/g;
19338
- jsxSingleQuoteEscapedCharsRegExp = /[\'\u0000-\u001f\u2028\u2029\u0085]/g;
19346
+ jsxDoubleQuoteEscapedCharsRegExp = /["\u0000-\u001f\u2028\u2029\u0085]/g;
19347
+ jsxSingleQuoteEscapedCharsRegExp = /['\u0000-\u001f\u2028\u2029\u0085]/g;
19339
19348
  jsxEscapedCharsMap = new Map(Object.entries({
19340
19349
  '"': """,
19341
19350
  "'": "'"
@@ -19356,7 +19365,7 @@ ${lanes.join("\n")}
19356
19365
  getSourceMapSourceConstructor: () => SourceMapSource
19357
19366
  };
19358
19367
  objectAllocatorPatchers = [];
19359
- reservedCharacterPattern = /[^\w\s\/]/g;
19368
+ reservedCharacterPattern = /[^\w\s/]/g;
19360
19369
  wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
19361
19370
  commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
19362
19371
  implicitExcludePathRegexPattern = `(?!(${commonPackageFolders.join("|")})(/|$))`;
@@ -45518,6 +45527,7 @@ ${lanes.join("\n")}
45518
45527
  var moduleKind = getEmitModuleKind(compilerOptions);
45519
45528
  var legacyDecorators = !!compilerOptions.experimentalDecorators;
45520
45529
  var useDefineForClassFields = getUseDefineForClassFields(compilerOptions);
45530
+ var emitStandardClassFields = getEmitStandardClassFields(compilerOptions);
45521
45531
  var allowSyntheticDefaultImports = getAllowSyntheticDefaultImports(compilerOptions);
45522
45532
  var strictNullChecks = getStrictOptionValue(compilerOptions, "strictNullChecks");
45523
45533
  var strictFunctionTypes = getStrictOptionValue(compilerOptions, "strictFunctionTypes");
@@ -46872,7 +46882,7 @@ ${lanes.join("\n")}
46872
46882
  false
46873
46883
  );
46874
46884
  } else if (isParameterPropertyDeclaration(declaration, declaration.parent)) {
46875
- return !(getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields && getContainingClass(declaration) === getContainingClass(usage) && isUsedInFunctionOrInstanceProperty(usage, declaration));
46885
+ return !(emitStandardClassFields && getContainingClass(declaration) === getContainingClass(usage) && isUsedInFunctionOrInstanceProperty(usage, declaration));
46876
46886
  }
46877
46887
  return true;
46878
46888
  }
@@ -46886,7 +46896,7 @@ ${lanes.join("\n")}
46886
46896
  return true;
46887
46897
  }
46888
46898
  if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {
46889
- if (getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */ && useDefineForClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) {
46899
+ if (emitStandardClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) {
46890
46900
  return !isPropertyImmediatelyReferencedWithinDeclaration(
46891
46901
  declaration,
46892
46902
  usage,
@@ -47010,7 +47020,7 @@ ${lanes.join("\n")}
47010
47020
  return requiresScopeChangeWorker(node.name);
47011
47021
  case 172 /* PropertyDeclaration */:
47012
47022
  if (hasStaticModifier(node)) {
47013
- return target < 99 /* ESNext */ || !useDefineForClassFields;
47023
+ return !emitStandardClassFields;
47014
47024
  }
47015
47025
  return requiresScopeChangeWorker(node.name);
47016
47026
  default:
@@ -47281,7 +47291,7 @@ ${lanes.join("\n")}
47281
47291
  }
47282
47292
  }
47283
47293
  function checkAndReportErrorForInvalidInitializer() {
47284
- if (propertyWithInvalidInitializer && !(useDefineForClassFields && getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */)) {
47294
+ if (propertyWithInvalidInitializer && !emitStandardClassFields) {
47285
47295
  error2(
47286
47296
  errorLocation,
47287
47297
  errorLocation && propertyWithInvalidInitializer.type && textRangeContainsPositionInclusive(propertyWithInvalidInitializer.type, errorLocation.pos) ? Diagnostics.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor : Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,
@@ -56074,7 +56084,7 @@ ${lanes.join("\n")}
56074
56084
  if (baseConstructorIndexInfo) {
56075
56085
  indexInfos = append(indexInfos, baseConstructorIndexInfo);
56076
56086
  }
56077
- if (symbol.flags & 384 /* Enum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ || some(type.properties, (prop) => !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */)))) {
56087
+ if (symbol.flags & 256 /* RegularEnum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ || some(type.properties, (prop) => !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */)))) {
56078
56088
  indexInfos = append(indexInfos, enumNumberIndexInfo);
56079
56089
  }
56080
56090
  }
@@ -57489,7 +57499,7 @@ ${lanes.join("\n")}
57489
57499
  return getReturnTypeOfTypeTag(declaration);
57490
57500
  }
57491
57501
  function isResolvingReturnTypeOfSignature(signature) {
57492
- return !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, 3 /* ResolvedReturnType */) >= 0;
57502
+ return signature.compositeSignatures && some(signature.compositeSignatures, isResolvingReturnTypeOfSignature) || !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, 3 /* ResolvedReturnType */) >= 0;
57493
57503
  }
57494
57504
  function getRestTypeOfSignature(signature) {
57495
57505
  return tryGetRestTypeOfSignature(signature) || anyType;
@@ -58837,6 +58847,9 @@ ${lanes.join("\n")}
58837
58847
  function getEndElementCount(type, flags) {
58838
58848
  return type.elementFlags.length - findLastIndex(type.elementFlags, (f) => !(f & flags)) - 1;
58839
58849
  }
58850
+ function getTotalFixedElementCount(type) {
58851
+ return type.fixedLength + getEndElementCount(type, 3 /* Fixed */);
58852
+ }
58840
58853
  function getElementTypes(type) {
58841
58854
  const typeArguments = getTypeArguments(type);
58842
58855
  const arity = getTypeReferenceArity(type);
@@ -59742,10 +59755,7 @@ ${lanes.join("\n")}
59742
59755
  }
59743
59756
  if (index >= 0) {
59744
59757
  errorIfWritingToReadonlyIndex(getIndexInfoOfType(objectType, numberType));
59745
- return mapType(objectType, (t) => {
59746
- const restType = getRestTypeOfTupleType(t) || undefinedType;
59747
- return accessFlags & 1 /* IncludeUndefined */ ? getUnionType([restType, missingType]) : restType;
59748
- });
59758
+ return getTupleElementTypeOutOfStartCount(objectType, index, accessFlags & 1 /* IncludeUndefined */ ? missingType : void 0);
59749
59759
  }
59750
59760
  }
59751
59761
  }
@@ -60030,7 +60040,7 @@ ${lanes.join("\n")}
60030
60040
  }
60031
60041
  if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */)
60032
60042
  accessFlags |= 1 /* IncludeUndefined */;
60033
- if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)) || isGenericReducibleType(objectType))) {
60043
+ if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target)) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target))) || isGenericReducibleType(objectType))) {
60034
60044
  if (objectType.flags & 3 /* AnyOrUnknown */) {
60035
60045
  return objectType;
60036
60046
  }
@@ -65041,17 +65051,7 @@ ${lanes.join("\n")}
65041
65051
  return propType;
65042
65052
  }
65043
65053
  if (everyType(type, isTupleType)) {
65044
- return mapType(type, (t) => {
65045
- const tupleType = t;
65046
- const restType = getRestTypeOfTupleType(tupleType);
65047
- if (!restType) {
65048
- return undefinedType;
65049
- }
65050
- if (compilerOptions.noUncheckedIndexedAccess && index >= tupleType.target.fixedLength + getEndElementCount(tupleType.target, 3 /* Fixed */)) {
65051
- return getUnionType([restType, undefinedType]);
65052
- }
65053
- return restType;
65054
- });
65054
+ return getTupleElementTypeOutOfStartCount(type, index, compilerOptions.noUncheckedIndexedAccess ? undefinedType : void 0);
65055
65055
  }
65056
65056
  return void 0;
65057
65057
  }
@@ -65119,6 +65119,19 @@ ${lanes.join("\n")}
65119
65119
  function getRestTypeOfTupleType(type) {
65120
65120
  return getElementTypeOfSliceOfTupleType(type, type.target.fixedLength);
65121
65121
  }
65122
+ function getTupleElementTypeOutOfStartCount(type, index, undefinedOrMissingType2) {
65123
+ return mapType(type, (t) => {
65124
+ const tupleType = t;
65125
+ const restType = getRestTypeOfTupleType(tupleType);
65126
+ if (!restType) {
65127
+ return undefinedType;
65128
+ }
65129
+ if (undefinedOrMissingType2 && index >= getTotalFixedElementCount(tupleType.target)) {
65130
+ return getUnionType([restType, undefinedOrMissingType2]);
65131
+ }
65132
+ return restType;
65133
+ });
65134
+ }
65122
65135
  function getRestArrayTypeOfTupleType(type) {
65123
65136
  const restType = getRestTypeOfTupleType(type);
65124
65137
  return restType && createArrayType(restType);
@@ -66618,12 +66631,6 @@ ${lanes.join("\n")}
66618
66631
  }
66619
66632
  return links.resolvedSymbol;
66620
66633
  }
66621
- function isInTypeQuery(node) {
66622
- return !!findAncestor(
66623
- node,
66624
- (n) => n.kind === 186 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 166 /* QualifiedName */ ? false : "quit"
66625
- );
66626
- }
66627
66634
  function isInAmbientOrTypeNode(node) {
66628
66635
  return !!(node.flags & 33554432 /* Ambient */ || findAncestor(node, (n) => isInterfaceDeclaration(n) || isTypeAliasDeclaration(n) || isTypeLiteralNode(n)));
66629
66636
  }
@@ -69727,75 +69734,41 @@ ${lanes.join("\n")}
69727
69734
  return mapType(
69728
69735
  type,
69729
69736
  (t) => {
69730
- if (!(t.flags & 3670016 /* StructuredType */)) {
69731
- return void 0;
69732
- }
69733
- if (t.flags & 2097152 /* Intersection */) {
69734
- const intersection = t;
69735
- let applicableIndexedMappedTypeSubstitions;
69736
- let concretePropertyTypes;
69737
- let applicableIndexInfoCandidates;
69738
- for (const t2 of intersection.types) {
69739
- if (isGenericMappedType(t2) && !t2.declaration.nameType) {
69740
- applicableIndexedMappedTypeSubstitions = append(applicableIndexedMappedTypeSubstitions, getTypeOfApplicableIndexedMappedTypeSubstitutionOfContextualType(t2));
69741
- continue;
69742
- }
69743
- const typeOfConcreteProperty = getTypeOfConcretePropertyOfContextualType(t2);
69744
- if (typeOfConcreteProperty) {
69745
- concretePropertyTypes = append(concretePropertyTypes, typeOfConcreteProperty);
69746
- continue;
69747
- }
69748
- applicableIndexInfoCandidates = append(applicableIndexInfoCandidates, t2);
69749
- }
69750
- if (concretePropertyTypes) {
69751
- return getIntersectionType(concatenate(concretePropertyTypes, applicableIndexedMappedTypeSubstitions));
69737
+ var _a;
69738
+ if (isGenericMappedType(t) && !t.declaration.nameType) {
69739
+ const constraint = getConstraintTypeFromMappedType(t);
69740
+ const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
69741
+ const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
69742
+ if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
69743
+ return substituteIndexedMappedType(t, propertyNameType);
69744
+ }
69745
+ } else if (t.flags & 3670016 /* StructuredType */) {
69746
+ const prop = getPropertyOfType(t, name);
69747
+ if (prop) {
69748
+ return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop);
69752
69749
  }
69753
- const types = concatenate(mapDefined(applicableIndexInfoCandidates, getTypeOfApplicableIndexInfoOfContextualType), applicableIndexedMappedTypeSubstitions);
69754
- if (types.length > 0) {
69755
- return getIntersectionType(types);
69750
+ if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
69751
+ const restType = getElementTypeOfSliceOfTupleType(
69752
+ t,
69753
+ t.target.fixedLength,
69754
+ /*endSkipCount*/
69755
+ 0,
69756
+ /*writing*/
69757
+ false,
69758
+ /*noReductions*/
69759
+ true
69760
+ );
69761
+ if (restType) {
69762
+ return restType;
69763
+ }
69756
69764
  }
69757
- return void 0;
69765
+ return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
69758
69766
  }
69759
- return isGenericMappedType(t) && !t.declaration.nameType ? getTypeOfApplicableIndexedMappedTypeSubstitutionOfContextualType(t) : getTypeOfConcretePropertyOfContextualType(t) || getTypeOfApplicableIndexInfoOfContextualType(t);
69767
+ return void 0;
69760
69768
  },
69761
69769
  /*noReductions*/
69762
69770
  true
69763
69771
  );
69764
- function getTypeOfApplicableIndexedMappedTypeSubstitutionOfContextualType(t) {
69765
- const constraint = getConstraintTypeFromMappedType(t);
69766
- const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
69767
- const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name));
69768
- if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
69769
- return substituteIndexedMappedType(t, propertyNameType);
69770
- }
69771
- return void 0;
69772
- }
69773
- function getTypeOfConcretePropertyOfContextualType(t) {
69774
- const prop = getPropertyOfType(t, name);
69775
- if (prop) {
69776
- return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop);
69777
- }
69778
- if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) {
69779
- const restType = getElementTypeOfSliceOfTupleType(
69780
- t,
69781
- t.target.fixedLength,
69782
- /*endSkipCount*/
69783
- 0,
69784
- /*writing*/
69785
- false,
69786
- /*noReductions*/
69787
- true
69788
- );
69789
- if (restType) {
69790
- return restType;
69791
- }
69792
- }
69793
- return void 0;
69794
- }
69795
- function getTypeOfApplicableIndexInfoOfContextualType(t) {
69796
- var _a;
69797
- return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type;
69798
- }
69799
69772
  }
69800
69773
  function getContextualTypeForObjectLiteralMethod(node, contextFlags) {
69801
69774
  Debug.assert(isObjectLiteralMethod(node));
@@ -71880,7 +71853,7 @@ ${lanes.join("\n")}
71880
71853
  }
71881
71854
  let diagnosticMessage;
71882
71855
  const declarationName = idText(right);
71883
- if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 32 /* Static */) && (compilerOptions.useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) {
71856
+ if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 32 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) {
71884
71857
  diagnosticMessage = error2(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName);
71885
71858
  } else if (valueDeclaration.kind === 263 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) {
71886
71859
  diagnosticMessage = error2(right, Diagnostics.Class_0_used_before_its_declaration, declarationName);
@@ -77592,7 +77565,7 @@ ${lanes.join("\n")}
77592
77565
  case "length":
77593
77566
  case "caller":
77594
77567
  case "arguments":
77595
- if (compilerOptions.useDefineForClassFields) {
77568
+ if (useDefineForClassFields) {
77596
77569
  break;
77597
77570
  }
77598
77571
  case "prototype":
@@ -77740,7 +77713,7 @@ ${lanes.join("\n")}
77740
77713
  if (classExtendsNull) {
77741
77714
  error2(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null);
77742
77715
  }
77743
- const superCallShouldBeRootLevel = (getEmitScriptTarget(compilerOptions) !== 99 /* ESNext */ || !useDefineForClassFields) && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */)));
77716
+ const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */)));
77744
77717
  if (superCallShouldBeRootLevel) {
77745
77718
  if (!superCallIsRootLevelInConstructor(superCall, node.body)) {
77746
77719
  error2(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers);
@@ -81019,7 +80992,7 @@ ${lanes.join("\n")}
81019
80992
  node
81020
80993
  );
81021
80994
  const willTransformPrivateElementsOrClassStaticBlocks = languageVersion <= 9 /* ES2022 */;
81022
- const willTransformInitializers = !useDefineForClassFields || languageVersion < 9 /* ES2022 */;
80995
+ const willTransformInitializers = !emitStandardClassFields;
81023
80996
  if (willTransformStaticElementsOfDecoratedClass || willTransformPrivateElementsOrClassStaticBlocks) {
81024
80997
  for (const member of node.members) {
81025
80998
  if (willTransformStaticElementsOfDecoratedClass && classElementOrClassElementParameterIsDecorated(
@@ -134437,7 +134410,7 @@ ${lanes.join("\n")}
134437
134410
  "src/services/sourcemaps.ts"() {
134438
134411
  "use strict";
134439
134412
  init_ts4();
134440
- base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+\/=]+)$)?/;
134413
+ base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/;
134441
134414
  }
134442
134415
  });
134443
134416
 
@@ -142661,7 +142634,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142661
142634
  }
142662
142635
  return result;
142663
142636
  function escapeRegExp(str) {
142664
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
142637
+ return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
142665
142638
  }
142666
142639
  function getTodoCommentsRegExp() {
142667
142640
  const singleLineCommentStart = /(?:\/\/+\s*)/.source;
@@ -148463,7 +148436,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
148463
148436
  function findEndOfTextBetween(jsDocComment, from, to) {
148464
148437
  const comment = jsDocComment.getText().substring(from - jsDocComment.getStart(), to - jsDocComment.getStart());
148465
148438
  for (let i = comment.length; i > 0; i--) {
148466
- if (!/[*\/\s]/g.test(comment.substring(i - 1, i))) {
148439
+ if (!/[*/\s]/g.test(comment.substring(i - 1, i))) {
148467
148440
  return from + i;
148468
148441
  }
148469
148442
  }
@@ -151976,7 +151949,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
151976
151949
  );
151977
151950
  }
151978
151951
  function getSuggestion(messageText) {
151979
- const [_, suggestion] = flattenDiagnosticMessageText(messageText, "\n", 0).match(/\'(.*)\'/) || [];
151952
+ const [_, suggestion] = flattenDiagnosticMessageText(messageText, "\n", 0).match(/'(.*)'/) || [];
151980
151953
  return suggestion;
151981
151954
  }
151982
151955
  var fixId28, errorCodes34;
@@ -158145,7 +158118,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
158145
158118
  return { kind: 1 /* JsDocTagName */ };
158146
158119
  } else {
158147
158120
  const lineStart = getLineStartPositionForPosition(position, sourceFile);
158148
- if (!/[^\*|\s(/)]/.test(sourceFile.text.substring(lineStart, position))) {
158121
+ if (!/[^*|\s(/)]/.test(sourceFile.text.substring(lineStart, position))) {
158149
158122
  return { kind: 2 /* JsDocTag */ };
158150
158123
  }
158151
158124
  }
@@ -158444,24 +158417,34 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
158444
158417
  }
158445
158418
  }
158446
158419
  }
158447
- if (!isTypeLocation) {
158420
+ if (!isTypeLocation || isInTypeQuery(node)) {
158448
158421
  typeChecker.tryGetThisTypeAt(
158449
158422
  node,
158450
158423
  /*includeGlobalThis*/
158451
158424
  false
158452
158425
  );
158453
158426
  let type = typeChecker.getTypeAtLocation(node).getNonOptionalType();
158454
- let insertQuestionDot = false;
158455
- if (type.isNullableType()) {
158456
- const canCorrectToQuestionDot = isRightOfDot && !isRightOfQuestionDot && preferences.includeAutomaticOptionalChainCompletions !== false;
158457
- if (canCorrectToQuestionDot || isRightOfQuestionDot) {
158458
- type = type.getNonNullableType();
158459
- if (canCorrectToQuestionDot) {
158460
- insertQuestionDot = true;
158427
+ if (!isTypeLocation) {
158428
+ let insertQuestionDot = false;
158429
+ if (type.isNullableType()) {
158430
+ const canCorrectToQuestionDot = isRightOfDot && !isRightOfQuestionDot && preferences.includeAutomaticOptionalChainCompletions !== false;
158431
+ if (canCorrectToQuestionDot || isRightOfQuestionDot) {
158432
+ type = type.getNonNullableType();
158433
+ if (canCorrectToQuestionDot) {
158434
+ insertQuestionDot = true;
158435
+ }
158461
158436
  }
158462
158437
  }
158438
+ addTypeProperties(type, !!(node.flags & 65536 /* AwaitContext */), insertQuestionDot);
158439
+ } else {
158440
+ addTypeProperties(
158441
+ type.getNonNullableType(),
158442
+ /*insertAwait*/
158443
+ false,
158444
+ /*insertQuestionDot*/
158445
+ false
158446
+ );
158463
158447
  }
158464
- addTypeProperties(type, !!(node.flags & 65536 /* AwaitContext */), insertQuestionDot);
158465
158448
  }
158466
158449
  }
158467
158450
  function addTypeProperties(type, insertAwait, insertQuestionDot) {
@@ -172437,6 +172420,7 @@ ${options.prefix}` : "\n" : options.prefix
172437
172420
  getEmitModuleKind: () => getEmitModuleKind,
172438
172421
  getEmitModuleResolutionKind: () => getEmitModuleResolutionKind,
172439
172422
  getEmitScriptTarget: () => getEmitScriptTarget,
172423
+ getEmitStandardClassFields: () => getEmitStandardClassFields,
172440
172424
  getEnclosingBlockScopeContainer: () => getEnclosingBlockScopeContainer,
172441
172425
  getEnclosingContainer: () => getEnclosingContainer,
172442
172426
  getEncodedSemanticClassifications: () => getEncodedSemanticClassifications,
@@ -173112,6 +173096,7 @@ ${options.prefix}` : "\n" : options.prefix
173112
173096
  isInString: () => isInString,
173113
173097
  isInTemplateString: () => isInTemplateString,
173114
173098
  isInTopLevelContext: () => isInTopLevelContext,
173099
+ isInTypeQuery: () => isInTypeQuery,
173115
173100
  isIncrementalCompilation: () => isIncrementalCompilation,
173116
173101
  isIndexSignatureDeclaration: () => isIndexSignatureDeclaration,
173117
173102
  isIndexedAccessTypeNode: () => isIndexedAccessTypeNode,
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.2";
57
- var version = `${versionMajorMinor}.0-insiders.20230726`;
57
+ var version = `${versionMajorMinor}.0-insiders.20230731`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -507,7 +507,7 @@ function identity(x) {
507
507
  function toLowerCase(x) {
508
508
  return x.toLowerCase();
509
509
  }
510
- var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g;
510
+ var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g;
511
511
  function toFileNameLowerCase(x) {
512
512
  return fileNameLowerCaseRegExp.test(x) ? x.replace(fileNameLowerCaseRegExp, toLowerCase) : x;
513
513
  }
@@ -1067,7 +1067,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`,
1067
1067
  return func.name;
1068
1068
  } else {
1069
1069
  const text = Function.prototype.toString.call(func);
1070
- const match = /^function\s+([\w\$]+)\s*\(/.exec(text);
1070
+ const match = /^function\s+([\w$]+)\s*\(/.exec(text);
1071
1071
  return match ? match[1] : "";
1072
1072
  }
1073
1073
  }
@@ -1850,7 +1850,7 @@ ${lanes.join("\n")}
1850
1850
  })(Debug || (Debug = {}));
1851
1851
 
1852
1852
  // src/compiler/semver.ts
1853
- var versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i;
1853
+ var versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i;
1854
1854
  var prereleaseRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i;
1855
1855
  var prereleasePartRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i;
1856
1856
  var buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i;
@@ -11305,7 +11305,7 @@ function getResolveJsonModule(compilerOptions) {
11305
11305
  function getAllowJSCompilerOption(compilerOptions) {
11306
11306
  return compilerOptions.allowJs === void 0 ? !!compilerOptions.checkJs : compilerOptions.allowJs;
11307
11307
  }
11308
- var reservedCharacterPattern = /[^\w\s\/]/g;
11308
+ var reservedCharacterPattern = /[^\w\s/]/g;
11309
11309
  var wildcardCharCodes = [42 /* asterisk */, 63 /* question */];
11310
11310
  var commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
11311
11311
  var implicitExcludePathRegexPattern = `(?!(${commonPackageFolders.join("|")})(/|$))`;
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.2.0-pr-52095-19",
5
+ "version": "5.2.0-pr-55214-6",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -114,5 +114,5 @@
114
114
  "node": "20.1.0",
115
115
  "npm": "8.19.4"
116
116
  },
117
- "gitHead": "4c71532aed3e7c13c47ac849a5161e466ec26773"
117
+ "gitHead": "7b3d3f7bf8a0cd125b81d1ca3c3e0bedcba6a8f6"
118
118
  }