@typescript-deploys/pr-build 5.3.0-pr-55601-8 → 5.3.0-pr-55638-16

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/SECURITY.md CHANGED
@@ -1,18 +1,18 @@
1
- <!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->
1
+ <!-- BEGIN MICROSOFT SECURITY.MD V0.0.9 BLOCK -->
2
2
 
3
3
  ## Security
4
4
 
5
- Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
5
+ Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin).
6
6
 
7
- If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
7
+ If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below.
8
8
 
9
9
  ## Reporting Security Issues
10
10
 
11
11
  **Please do not report security vulnerabilities through public GitHub issues.**
12
12
 
13
- Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
13
+ Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report).
14
14
 
15
- If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
15
+ If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).
16
16
 
17
17
  You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
18
18
 
@@ -28,7 +28,7 @@ Please include the requested information listed below (as much as you can provid
28
28
 
29
29
  This information will help us triage your report more quickly.
30
30
 
31
- If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
31
+ If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs.
32
32
 
33
33
  ## Preferred Languages
34
34
 
@@ -36,6 +36,6 @@ We prefer all communications to be in English.
36
36
 
37
37
  ## Policy
38
38
 
39
- Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
39
+ Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd).
40
40
 
41
41
  <!-- END MICROSOFT SECURITY.MD BLOCK -->
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.20230902`;
21
+ var version = `${versionMajorMinor}.0-insiders.20230908`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -3704,6 +3704,7 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
3704
3704
  ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface";
3705
3705
  ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening";
3706
3706
  ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags";
3707
+ ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped";
3707
3708
  ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask";
3708
3709
  ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread";
3709
3710
  ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType";
@@ -37975,7 +37976,6 @@ function realPath(path, host, traceEnabled) {
37975
37976
  if (traceEnabled) {
37976
37977
  trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path, real);
37977
37978
  }
37978
- Debug.assert(host.fileExists(real), `${path} linked to nonexistent file ${real}`);
37979
37979
  return real;
37980
37980
  }
37981
37981
  function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
@@ -62383,8 +62383,13 @@ function createTypeChecker(host) {
62383
62383
  if (getObjectFlags(type) & 4 /* Reference */ && type.node) {
62384
62384
  return type.node;
62385
62385
  }
62386
- if (type.symbol && !(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) {
62387
- return type.symbol;
62386
+ if (type.symbol) {
62387
+ if (getObjectFlags(type) & 32 /* Mapped */) {
62388
+ type = getMappedTargetWithSymbol(type);
62389
+ }
62390
+ if (!(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) {
62391
+ return type.symbol;
62392
+ }
62388
62393
  }
62389
62394
  if (isTupleType(type)) {
62390
62395
  return type.target;
@@ -62404,6 +62409,13 @@ function createTypeChecker(host) {
62404
62409
  }
62405
62410
  return type;
62406
62411
  }
62412
+ function getMappedTargetWithSymbol(type) {
62413
+ let target = type;
62414
+ while ((getObjectFlags(target) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */ && isMappedTypeWithKeyofConstraintDeclaration(target)) {
62415
+ target = getModifiersTypeFromMappedType(target);
62416
+ }
62417
+ return target.symbol ? target : type;
62418
+ }
62407
62419
  function isPropertyIdenticalTo(sourceProp, targetProp) {
62408
62420
  return compareProperties(sourceProp, targetProp, compareTypesIdentical) !== 0 /* False */;
62409
62421
  }
@@ -72779,10 +72791,6 @@ function createTypeChecker(host) {
72779
72791
  const nextTypes = [];
72780
72792
  const isAsync = (getFunctionFlags(func) & 2 /* Async */) !== 0;
72781
72793
  forEachYieldExpression(func.body, (yieldExpression) => {
72782
- const statement = findAncestor(yieldExpression, isStatement);
72783
- if (canHaveFlowNode(statement) && !statement.flowNode && !compilerOptions.allowUnreachableCode) {
72784
- return;
72785
- }
72786
72794
  const yieldExpressionType = yieldExpression.expression ? checkExpression(yieldExpression.expression, checkMode) : undefinedWideningType;
72787
72795
  pushIfUnique(yieldTypes, getYieldedTypeOfYieldExpression(yieldExpression, yieldExpressionType, anyType, isAsync));
72788
72796
  let nextType;
@@ -72873,9 +72881,6 @@ function createTypeChecker(host) {
72873
72881
  hasReturnOfTypeNever = true;
72874
72882
  return;
72875
72883
  }
72876
- if (!returnStatement.flowNode && !compilerOptions.allowUnreachableCode) {
72877
- return;
72878
- }
72879
72884
  let type = checkExpressionCached(expr, checkMode && checkMode & ~8 /* SkipGenericFunctions */);
72880
72885
  if (functionFlags & 2 /* Async */) {
72881
72886
  type = unwrapAwaitedType(checkAwaitedType(
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.20230902`;
2330
+ var version = `${versionMajorMinor}.0-insiders.20230908`;
2331
2331
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2332
2332
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2333
2333
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6695,6 +6695,7 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
6695
6695
  ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface";
6696
6696
  ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening";
6697
6697
  ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags";
6698
+ ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped";
6698
6699
  ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask";
6699
6700
  ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread";
6700
6701
  ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType";
@@ -42494,7 +42495,6 @@ function realPath(path, host, traceEnabled) {
42494
42495
  if (traceEnabled) {
42495
42496
  trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path, real);
42496
42497
  }
42497
- Debug.assert(host.fileExists(real), `${path} linked to nonexistent file ${real}`);
42498
42498
  return real;
42499
42499
  }
42500
42500
  function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
@@ -67085,8 +67085,13 @@ function createTypeChecker(host) {
67085
67085
  if (getObjectFlags(type) & 4 /* Reference */ && type.node) {
67086
67086
  return type.node;
67087
67087
  }
67088
- if (type.symbol && !(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) {
67089
- return type.symbol;
67088
+ if (type.symbol) {
67089
+ if (getObjectFlags(type) & 32 /* Mapped */) {
67090
+ type = getMappedTargetWithSymbol(type);
67091
+ }
67092
+ if (!(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) {
67093
+ return type.symbol;
67094
+ }
67090
67095
  }
67091
67096
  if (isTupleType(type)) {
67092
67097
  return type.target;
@@ -67106,6 +67111,13 @@ function createTypeChecker(host) {
67106
67111
  }
67107
67112
  return type;
67108
67113
  }
67114
+ function getMappedTargetWithSymbol(type) {
67115
+ let target = type;
67116
+ while ((getObjectFlags(target) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */ && isMappedTypeWithKeyofConstraintDeclaration(target)) {
67117
+ target = getModifiersTypeFromMappedType(target);
67118
+ }
67119
+ return target.symbol ? target : type;
67120
+ }
67109
67121
  function isPropertyIdenticalTo(sourceProp, targetProp) {
67110
67122
  return compareProperties2(sourceProp, targetProp, compareTypesIdentical) !== 0 /* False */;
67111
67123
  }
@@ -77481,10 +77493,6 @@ function createTypeChecker(host) {
77481
77493
  const nextTypes = [];
77482
77494
  const isAsync = (getFunctionFlags(func) & 2 /* Async */) !== 0;
77483
77495
  forEachYieldExpression(func.body, (yieldExpression) => {
77484
- const statement = findAncestor(yieldExpression, isStatement);
77485
- if (canHaveFlowNode(statement) && !statement.flowNode && !compilerOptions.allowUnreachableCode) {
77486
- return;
77487
- }
77488
77496
  const yieldExpressionType = yieldExpression.expression ? checkExpression(yieldExpression.expression, checkMode) : undefinedWideningType;
77489
77497
  pushIfUnique(yieldTypes, getYieldedTypeOfYieldExpression(yieldExpression, yieldExpressionType, anyType, isAsync));
77490
77498
  let nextType;
@@ -77575,9 +77583,6 @@ function createTypeChecker(host) {
77575
77583
  hasReturnOfTypeNever = true;
77576
77584
  return;
77577
77585
  }
77578
- if (!returnStatement.flowNode && !compilerOptions.allowUnreachableCode) {
77579
- return;
77580
- }
77581
77586
  let type = checkExpressionCached(expr, checkMode && checkMode & ~8 /* SkipGenericFunctions */);
77582
77587
  if (functionFlags & 2 /* Async */) {
77583
77588
  type = unwrapAwaitedType(checkAwaitedType(
@@ -136436,30 +136441,37 @@ __export(ts_NavigateTo_exports, {
136436
136441
  });
136437
136442
 
136438
136443
  // src/services/navigateTo.ts
136439
- function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles) {
136444
+ function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles) {
136440
136445
  const patternMatcher = createPatternMatcher(searchValue);
136441
136446
  if (!patternMatcher)
136442
136447
  return emptyArray;
136443
136448
  const rawItems = [];
136449
+ const singleCurrentFile = sourceFiles.length === 1 ? sourceFiles[0] : void 0;
136444
136450
  for (const sourceFile of sourceFiles) {
136445
136451
  cancellationToken.throwIfCancellationRequested();
136446
136452
  if (excludeDtsFiles && sourceFile.isDeclarationFile) {
136447
136453
  continue;
136448
136454
  }
136455
+ if (shouldExcludeFile(sourceFile, !!excludeLibFiles, singleCurrentFile)) {
136456
+ continue;
136457
+ }
136449
136458
  sourceFile.getNamedDeclarations().forEach((declarations, name) => {
136450
- getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, rawItems);
136459
+ getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, !!excludeLibFiles, singleCurrentFile, rawItems);
136451
136460
  });
136452
136461
  }
136453
136462
  rawItems.sort(compareNavigateToItems);
136454
136463
  return (maxResultCount === void 0 ? rawItems : rawItems.slice(0, maxResultCount)).map(createNavigateToItem);
136455
136464
  }
136456
- function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, rawItems) {
136465
+ function shouldExcludeFile(file, excludeLibFiles, singleCurrentFile) {
136466
+ return file !== singleCurrentFile && excludeLibFiles && (isInsideNodeModules(file.path) || file.hasNoDefaultLib);
136467
+ }
136468
+ function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, excludeLibFiles, singleCurrentFile, rawItems) {
136457
136469
  const match = patternMatcher.getMatchForLastSegmentOfPattern(name);
136458
136470
  if (!match) {
136459
136471
  return;
136460
136472
  }
136461
136473
  for (const declaration of declarations) {
136462
- if (!shouldKeepItem(declaration, checker))
136474
+ if (!shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile))
136463
136475
  continue;
136464
136476
  if (patternMatcher.patternContainsDots) {
136465
136477
  const fullMatch = patternMatcher.getFullMatch(getContainers(declaration), name);
@@ -136471,14 +136483,15 @@ function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checke
136471
136483
  }
136472
136484
  }
136473
136485
  }
136474
- function shouldKeepItem(declaration, checker) {
136486
+ function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile) {
136487
+ var _a;
136475
136488
  switch (declaration.kind) {
136476
136489
  case 273 /* ImportClause */:
136477
136490
  case 276 /* ImportSpecifier */:
136478
136491
  case 271 /* ImportEqualsDeclaration */:
136479
136492
  const importer = checker.getSymbolAtLocation(declaration.name);
136480
136493
  const imported = checker.getAliasedSymbol(importer);
136481
- return importer.escapedName !== imported.escapedName;
136494
+ return importer.escapedName !== imported.escapedName && !((_a = imported.declarations) == null ? void 0 : _a.every((d) => shouldExcludeFile(d.getSourceFile(), excludeLibFiles, singleCurrentFile)));
136482
136495
  default:
136483
136496
  return true;
136484
136497
  }
@@ -144170,10 +144183,10 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
144170
144183
  synchronizeHostData();
144171
144184
  return ts_FindAllReferences_exports.Core.getReferencesForFileName(fileName, program, program.getSourceFiles()).map(ts_FindAllReferences_exports.toReferenceEntry);
144172
144185
  }
144173
- function getNavigateToItems2(searchValue, maxResultCount, fileName, excludeDtsFiles = false) {
144186
+ function getNavigateToItems2(searchValue, maxResultCount, fileName, excludeDtsFiles = false, excludeLibFiles = false) {
144174
144187
  synchronizeHostData();
144175
144188
  const sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles();
144176
- return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles);
144189
+ return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles);
144177
144190
  }
144178
144191
  function getEmitOutput(fileName, emitOnlyDtsFiles, forceDtsEmit) {
144179
144192
  synchronizeHostData();
@@ -184289,6 +184302,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
184289
184302
  const { file, project } = this.getFileAndProject(args);
184290
184303
  return [{ project, navigateToItems: project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, file) }];
184291
184304
  }
184305
+ const preferences = this.getHostPreferences();
184292
184306
  const outputs = [];
184293
184307
  const seenItems = /* @__PURE__ */ new Map();
184294
184308
  if (!args.file && !projectFileName) {
@@ -184311,7 +184325,9 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
184311
184325
  /*fileName*/
184312
184326
  void 0,
184313
184327
  /*excludeDts*/
184314
- project.isNonTsProject()
184328
+ project.isNonTsProject(),
184329
+ /*excludeLibFiles*/
184330
+ preferences.excludeLibrarySymbolsInNavTo
184315
184331
  );
184316
184332
  const unseenItems = filter(projectItems, (item) => tryAddSeenItem(item) && !getMappedLocationForProject(documentSpanLocation(item), project));
184317
184333
  if (unseenItems.length) {
@@ -2897,6 +2897,10 @@ declare namespace ts {
2897
2897
  * Indicates whether {@link ReferencesResponseItem.lineText} is supported.
2898
2898
  */
2899
2899
  readonly disableLineTextInReferences?: boolean;
2900
+ /**
2901
+ * Indicates whether to exclude standard library and node_modules file symbols from navTo results.
2902
+ */
2903
+ readonly excludeLibrarySymbolsInNavTo?: boolean;
2900
2904
  }
2901
2905
  interface CompilerOptions {
2902
2906
  allowJs?: boolean;
@@ -8640,6 +8644,7 @@ declare namespace ts {
8640
8644
  readonly organizeImportsNumericCollation?: boolean;
8641
8645
  readonly organizeImportsAccentCollation?: boolean;
8642
8646
  readonly organizeImportsCaseFirst?: "upper" | "lower" | false;
8647
+ readonly excludeLibrarySymbolsInNavTo?: boolean;
8643
8648
  }
8644
8649
  /** Represents a bigint literal value without requiring bigint support */
8645
8650
  interface PseudoBigInt {
@@ -10396,7 +10401,7 @@ declare namespace ts {
10396
10401
  findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined;
10397
10402
  getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined;
10398
10403
  getFileReferences(fileName: string): ReferenceEntry[];
10399
- getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[];
10404
+ getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean, excludeLibFiles?: boolean): NavigateToItem[];
10400
10405
  getNavigationBarItems(fileName: string): NavigationBarItem[];
10401
10406
  getNavigationTree(fileName: string): NavigationTree;
10402
10407
  prepareCallHierarchy(fileName: string, position: number): CallHierarchyItem | CallHierarchyItem[] | undefined;
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.20230902`;
38
+ version = `${versionMajorMinor}.0-insiders.20230908`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -4461,6 +4461,7 @@ ${lanes.join("\n")}
4461
4461
  ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface";
4462
4462
  ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening";
4463
4463
  ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags";
4464
+ ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped";
4464
4465
  ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask";
4465
4466
  ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread";
4466
4467
  ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType";
@@ -40340,7 +40341,6 @@ ${lanes.join("\n")}
40340
40341
  if (traceEnabled) {
40341
40342
  trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path, real);
40342
40343
  }
40343
- Debug.assert(host.fileExists(real), `${path} linked to nonexistent file ${real}`);
40344
40344
  return real;
40345
40345
  }
40346
40346
  function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
@@ -64852,8 +64852,13 @@ ${lanes.join("\n")}
64852
64852
  if (getObjectFlags(type) & 4 /* Reference */ && type.node) {
64853
64853
  return type.node;
64854
64854
  }
64855
- if (type.symbol && !(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) {
64856
- return type.symbol;
64855
+ if (type.symbol) {
64856
+ if (getObjectFlags(type) & 32 /* Mapped */) {
64857
+ type = getMappedTargetWithSymbol(type);
64858
+ }
64859
+ if (!(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) {
64860
+ return type.symbol;
64861
+ }
64857
64862
  }
64858
64863
  if (isTupleType(type)) {
64859
64864
  return type.target;
@@ -64873,6 +64878,13 @@ ${lanes.join("\n")}
64873
64878
  }
64874
64879
  return type;
64875
64880
  }
64881
+ function getMappedTargetWithSymbol(type) {
64882
+ let target = type;
64883
+ while ((getObjectFlags(target) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */ && isMappedTypeWithKeyofConstraintDeclaration(target)) {
64884
+ target = getModifiersTypeFromMappedType(target);
64885
+ }
64886
+ return target.symbol ? target : type;
64887
+ }
64876
64888
  function isPropertyIdenticalTo(sourceProp, targetProp) {
64877
64889
  return compareProperties2(sourceProp, targetProp, compareTypesIdentical) !== 0 /* False */;
64878
64890
  }
@@ -75248,10 +75260,6 @@ ${lanes.join("\n")}
75248
75260
  const nextTypes = [];
75249
75261
  const isAsync = (getFunctionFlags(func) & 2 /* Async */) !== 0;
75250
75262
  forEachYieldExpression(func.body, (yieldExpression) => {
75251
- const statement = findAncestor(yieldExpression, isStatement);
75252
- if (canHaveFlowNode(statement) && !statement.flowNode && !compilerOptions.allowUnreachableCode) {
75253
- return;
75254
- }
75255
75263
  const yieldExpressionType = yieldExpression.expression ? checkExpression(yieldExpression.expression, checkMode) : undefinedWideningType;
75256
75264
  pushIfUnique(yieldTypes, getYieldedTypeOfYieldExpression(yieldExpression, yieldExpressionType, anyType, isAsync));
75257
75265
  let nextType;
@@ -75342,9 +75350,6 @@ ${lanes.join("\n")}
75342
75350
  hasReturnOfTypeNever = true;
75343
75351
  return;
75344
75352
  }
75345
- if (!returnStatement.flowNode && !compilerOptions.allowUnreachableCode) {
75346
- return;
75347
- }
75348
75353
  let type = checkExpressionCached(expr, checkMode && checkMode & ~8 /* SkipGenericFunctions */);
75349
75354
  if (functionFlags & 2 /* Async */) {
75350
75355
  type = unwrapAwaitedType(checkAwaitedType(
@@ -134810,30 +134815,37 @@ ${lanes.join("\n")}
134810
134815
  });
134811
134816
 
134812
134817
  // src/services/navigateTo.ts
134813
- function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles) {
134818
+ function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles) {
134814
134819
  const patternMatcher = createPatternMatcher(searchValue);
134815
134820
  if (!patternMatcher)
134816
134821
  return emptyArray;
134817
134822
  const rawItems = [];
134823
+ const singleCurrentFile = sourceFiles.length === 1 ? sourceFiles[0] : void 0;
134818
134824
  for (const sourceFile of sourceFiles) {
134819
134825
  cancellationToken.throwIfCancellationRequested();
134820
134826
  if (excludeDtsFiles && sourceFile.isDeclarationFile) {
134821
134827
  continue;
134822
134828
  }
134829
+ if (shouldExcludeFile(sourceFile, !!excludeLibFiles, singleCurrentFile)) {
134830
+ continue;
134831
+ }
134823
134832
  sourceFile.getNamedDeclarations().forEach((declarations, name) => {
134824
- getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, rawItems);
134833
+ getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, !!excludeLibFiles, singleCurrentFile, rawItems);
134825
134834
  });
134826
134835
  }
134827
134836
  rawItems.sort(compareNavigateToItems);
134828
134837
  return (maxResultCount === void 0 ? rawItems : rawItems.slice(0, maxResultCount)).map(createNavigateToItem);
134829
134838
  }
134830
- function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, rawItems) {
134839
+ function shouldExcludeFile(file, excludeLibFiles, singleCurrentFile) {
134840
+ return file !== singleCurrentFile && excludeLibFiles && (isInsideNodeModules(file.path) || file.hasNoDefaultLib);
134841
+ }
134842
+ function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, excludeLibFiles, singleCurrentFile, rawItems) {
134831
134843
  const match = patternMatcher.getMatchForLastSegmentOfPattern(name);
134832
134844
  if (!match) {
134833
134845
  return;
134834
134846
  }
134835
134847
  for (const declaration of declarations) {
134836
- if (!shouldKeepItem(declaration, checker))
134848
+ if (!shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile))
134837
134849
  continue;
134838
134850
  if (patternMatcher.patternContainsDots) {
134839
134851
  const fullMatch = patternMatcher.getFullMatch(getContainers(declaration), name);
@@ -134845,14 +134857,15 @@ ${lanes.join("\n")}
134845
134857
  }
134846
134858
  }
134847
134859
  }
134848
- function shouldKeepItem(declaration, checker) {
134860
+ function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile) {
134861
+ var _a;
134849
134862
  switch (declaration.kind) {
134850
134863
  case 273 /* ImportClause */:
134851
134864
  case 276 /* ImportSpecifier */:
134852
134865
  case 271 /* ImportEqualsDeclaration */:
134853
134866
  const importer = checker.getSymbolAtLocation(declaration.name);
134854
134867
  const imported = checker.getAliasedSymbol(importer);
134855
- return importer.escapedName !== imported.escapedName;
134868
+ return importer.escapedName !== imported.escapedName && !((_a = imported.declarations) == null ? void 0 : _a.every((d) => shouldExcludeFile(d.getSourceFile(), excludeLibFiles, singleCurrentFile)));
134856
134869
  default:
134857
134870
  return true;
134858
134871
  }
@@ -142115,10 +142128,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
142115
142128
  synchronizeHostData();
142116
142129
  return ts_FindAllReferences_exports.Core.getReferencesForFileName(fileName, program, program.getSourceFiles()).map(ts_FindAllReferences_exports.toReferenceEntry);
142117
142130
  }
142118
- function getNavigateToItems2(searchValue, maxResultCount, fileName, excludeDtsFiles = false) {
142131
+ function getNavigateToItems2(searchValue, maxResultCount, fileName, excludeDtsFiles = false, excludeLibFiles = false) {
142119
142132
  synchronizeHostData();
142120
142133
  const sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles();
142121
- return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles);
142134
+ return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles);
142122
142135
  }
142123
142136
  function getEmitOutput(fileName, emitOnlyDtsFiles, forceDtsEmit) {
142124
142137
  synchronizeHostData();
@@ -181704,6 +181717,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
181704
181717
  const { file, project } = this.getFileAndProject(args);
181705
181718
  return [{ project, navigateToItems: project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, file) }];
181706
181719
  }
181720
+ const preferences = this.getHostPreferences();
181707
181721
  const outputs = [];
181708
181722
  const seenItems = /* @__PURE__ */ new Map();
181709
181723
  if (!args.file && !projectFileName) {
@@ -181726,7 +181740,9 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
181726
181740
  /*fileName*/
181727
181741
  void 0,
181728
181742
  /*excludeDts*/
181729
- project.isNonTsProject()
181743
+ project.isNonTsProject(),
181744
+ /*excludeLibFiles*/
181745
+ preferences.excludeLibrarySymbolsInNavTo
181730
181746
  );
181731
181747
  const unseenItems = filter(projectItems, (item) => tryAddSeenItem(item) && !getMappedLocationForProject(documentSpanLocation(item), project));
181732
181748
  if (unseenItems.length) {
@@ -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.20230902`;
57
+ var version = `${versionMajorMinor}.0-insiders.20230908`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -3138,6 +3138,7 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => {
3138
3138
  ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface";
3139
3139
  ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening";
3140
3140
  ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags";
3141
+ ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped";
3141
3142
  ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask";
3142
3143
  ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread";
3143
3144
  ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType";
@@ -27887,7 +27888,6 @@ function realPath(path2, host, traceEnabled) {
27887
27888
  if (traceEnabled) {
27888
27889
  trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path2, real);
27889
27890
  }
27890
- Debug.assert(host.fileExists(real), `${path2} linked to nonexistent file ${real}`);
27891
27891
  return real;
27892
27892
  }
27893
27893
  function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
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-55601-8",
5
+ "version": "5.3.0-pr-55638-16",
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": "e8398b84acc121aaea2e4e75ffb98d09d69cd0d9"
116
+ "gitHead": "d7989b37bac1163a3437ead1b3d4ae6d6c6032f8"
117
117
  }