| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…NonInferrableType propagation Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
|
TypeScript Bot (@typescript-bot) test this |
Sorry, something went wrong.
|
Starting jobs; this comment will be updated as builds start and complete.
|
Sorry, something went wrong.
There was a problem hiding this comment.
Ports two TypeScript type-checker fixes from typescript-go into the main compiler: (1) correct subtype reduction behavior involving the internal anyFunctionType wildcard, and (2) ensure JSX children spread types propagate NonInferrableType so context-sensitive discrimination works for generic JSX component signatures.
Changes:
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file| File | Description |
|---|---|
| src/compiler/checker.ts | Adjusts anyFunctionType signature relatedness semantics; propagates children flags (incl. NonInferrableType) into JSX children spread typing. |
| tests/cases/compiler/subtypeReductionWithAnyFunctionType.ts | New regression test for union subtype reduction involving anyFunctionType, ensuring real function types aren’t incorrectly reduced away. |
| tests/baselines/reference/subtypeReductionWithAnyFunctionType.types | Type baseline validating inferred types (notably the any parameter) for the new subtype reduction test. |
| tests/baselines/reference/subtypeReductionWithAnyFunctionType.symbols | Symbols baseline for the new subtype reduction test. |
| tests/baselines/reference/subtypeReductionWithAnyFunctionType.errors.txt | Error baseline asserting the expected TS7006 implicit-any diagnostic. |
| tests/cases/compiler/jsxFunctionTypeChildren.tsx | New regression test ensuring JSX children function typing behaves like the equivalent non-JSX call in a generic props scenario. |
| tests/baselines/reference/jsxFunctionTypeChildren.types | Type baseline for the JSX children function typing test. |
| tests/baselines/reference/jsxFunctionTypeChildren.symbols | Symbols baseline for the JSX children function typing test. |
| tests/cases/compiler/contextuallyTypedJsxChildren2.tsx | New regression test for context-sensitive JSX children discrimination with generic signatures (children-body vs non-children prop). |
| tests/baselines/reference/contextuallyTypedJsxChildren2.types | Type baseline validating correct inference (e.g. selected: number) for the JSX discrimination test. |
| tests/baselines/reference/contextuallyTypedJsxChildren2.symbols | Symbols baseline for the JSX discrimination test. |
Sorry, something went wrong.
|
Hey Daniel Rosenwasser (@DanielRosenwasser), it looks like the DT test run failed. Please check the log for more details. |
Sorry, something went wrong.
Sorry, something went wrong.
|
Starting jobs; this comment will be updated as builds start and complete.
|
Sorry, something went wrong.
|
Daniel Rosenwasser (@DanielRosenwasser) Here are the results of running the user tests with tsc comparing main and refs/pull/63163/merge: There were infrastructure failures potentially unrelated to your change:
Otherwise... Everything looks good! |
Sorry, something went wrong.
|
Hey Jake Bailey (@jakebailey), it looks like the DT test run failed. Please check the log for more details. |
Sorry, something went wrong.
|
Daniel Rosenwasser (@DanielRosenwasser)
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sorry, something went wrong.
|
Daniel Rosenwasser (@DanielRosenwasser) Here are the results of running the top 400 repos with tsc comparing main and refs/pull/63163/merge: Everything looks good! |
Sorry, something went wrong.
|
DT is still broken due to the wordpress package 404, but the PR itself seems correct? |
Sorry, something went wrong.
|
PR looks good to me, but was waiting to see DT results. |
Sorry, something went wrong.
|
Fixed DT. |
Sorry, something went wrong.
|
Starting jobs; this comment will be updated as builds start and complete.
|
Sorry, something went wrong.
|
Hey Jake Bailey (@jakebailey), the results of running the DT tests are ready. Everything looks the same! |
Sorry, something went wrong.
|
Since I saw a ts6 rc may go out soon, figured I'd comment and note this would be good to have for parity with TS7 🙏 |
Sorry, something went wrong.
|
Oops, this was meant to be merged |
Sorry, something went wrong.
|
TypeScript Bot (@typescript-bot) cherry-pick this to release-6.0 and LKG |
Sorry, something went wrong.
|
Starting jobs; this comment will be updated as builds start and complete.
|
Sorry, something went wrong.
I'm glad, because I always feel rude making comments like this 😅 Thanks for all the work, as always! |
Sorry, something went wrong.
|
Hey, Daniel Rosenwasser (@DanielRosenwasser)! I've created #63208 for you. |
Sorry, something went wrong.
…e-6.0 (#63208) Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Ports two fixes from typescript-go:
anyFunctionType subtype relation
In signaturesRelatedTo, anyFunctionType was treated symmetrically—both as source and target it returned Ternary.True. This caused incorrect subtype reduction: when a union included anyFunctionType alongside a real function type, the real type could be reduced away instead of the wildcard.
Now anyFunctionType is a proper subtype (source → True) but not a supertype (target → False). This fixes inference in patterns like:
JSX children NonInferrableType propagation
When building the JSX attributes spread type for children, getPropagatingFlagsOfTypes(childrenTypes) was not included in the objectFlags passed to getSpreadType. This meant the NonInferrableType flag from anyFunctionType children wasn't propagated, breaking context-sensitive discrimination for generic JSX component signatures.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.