tsc-ts 0.1.1 → 0.1.3

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.
Files changed (41) hide show
  1. package/README.md +7 -1
  2. package/dist/api/compiler/ast.d.ts +6 -0
  3. package/dist/api/compiler/ast.js +19 -3
  4. package/dist/api/compiler/checker-functions.js +5 -1
  5. package/dist/api/compiler/checker-grammar.d.ts +39 -4
  6. package/dist/api/compiler/checker-grammar.js +239 -75
  7. package/dist/api/compiler/checker-heritage.js +20 -14
  8. package/dist/api/compiler/checker-modules.js +4 -2
  9. package/dist/api/compiler/checker-narrowing.d.ts +7 -0
  10. package/dist/api/compiler/checker-narrowing.js +31 -4
  11. package/dist/api/compiler/checker-source-file.js +16 -1
  12. package/dist/api/compiler/checker-statements.js +11 -2
  13. package/dist/api/compiler/checker-type-factory.js +17 -7
  14. package/dist/api/compiler/checker-type-nodes.d.ts +1 -1
  15. package/dist/api/compiler/checker-type-nodes.js +5 -5
  16. package/dist/api/compiler/checker-unused.js +15 -10
  17. package/dist/api/compiler/checker.d.ts +4 -0
  18. package/dist/api/compiler/checker.js +6 -0
  19. package/dist/api/compiler/file-loader.d.ts +5 -0
  20. package/dist/api/compiler/file-loader.js +7 -0
  21. package/dist/api/compiler/program-checker.d.ts +18 -0
  22. package/dist/api/compiler/program-checker.js +27 -0
  23. package/package.json +14 -9
  24. package/src/compiler/ast.ts +20 -3
  25. package/src/compiler/checker-functions.ts +5 -0
  26. package/src/compiler/checker-grammar.ts +247 -88
  27. package/src/compiler/checker-heritage.ts +31 -17
  28. package/src/compiler/checker-modules.ts +4 -2
  29. package/src/compiler/checker-narrowing.ts +30 -4
  30. package/src/compiler/checker-source-file.ts +16 -1
  31. package/src/compiler/checker-statements.ts +10 -2
  32. package/src/compiler/checker-type-factory.ts +14 -7
  33. package/src/compiler/checker-type-nodes.ts +5 -5
  34. package/src/compiler/checker-unused.ts +13 -8
  35. package/src/compiler/checker.ts +6 -0
  36. package/src/compiler/file-loader.ts +8 -0
  37. package/src/compiler/parallel-check.ts +13 -1
  38. package/src/compiler/parse-thread.ts +24 -2
  39. package/src/compiler/program-checker.ts +28 -0
  40. package/src/compiler/run-records.ts +12 -5
  41. package/src/compiler/tsc-compile.ts +10 -1
@@ -114,6 +114,7 @@ import {
114
114
  } from './checker-jsdoc.js';
115
115
  import { getEffectiveCheckNode, isFunctionLike, nodeIsMissing } from './ast-utilities.js';
116
116
  import {
117
+ endFlowAnalysisStop,
117
118
  getFlowTypeOfReferenceAt,
118
119
  isConstantReference,
119
120
  isReachableFlowNode,
@@ -437,6 +438,10 @@ export function checkFunctionLikeBody(c: Checker, node: Node): void {
437
438
  if (returnType !== undefined)
438
439
  checkReturnExpression(c, node, unwrapReturnType(c, returnType, functionFlags), body, body, exprType, false);
439
440
  }
441
+ // A body too large for control flow analysis stops narrowing in the rest of that body only
442
+ // (flowAnalysisDisabled, checker-narrowing.ts); what follows the body starts over. Inferring the
443
+ // return type above checks the body's return expressions, which can reach the limit.
444
+ endFlowAnalysisStop(c, body);
440
445
  }
441
446
 
442
447
  /** Checks a generator's or async function's return type annotation. */