Repository navigation
typescript: read strictBindCallApply off the call site's module - #1783
Merged
Merged
Conversation
In a project whose tsconfigs disagree on strictBindCallApply, every call/apply/bind on a callable receiver answered both Function's and CallableFunction's declaration, and a site in a loose program named the strict one. The flag now comes from the tsconfig governing the module the call is written in: a strict program's call answers CallableFunction, a loose program's answers Function. A module no tsconfig claims keeps the project-wide hedge, and a receiver that only reaches Function's member keeps it under any flag. The case oracle compiles each nested tsconfig as its own program, so a case can hold a strict and a loose program side by side. Case 82: oracle 10, engine 16 -> 10, extra 6 -> 0. Controls: cases 21, 22, 79 and the own-bind sites unchanged; 8 real apps (uniform regime) give identical edges before and after. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 29, 2026 06:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a project whose tsconfigs disagree on
strictBindCallApply,call/apply/bindon a callable receiver answered bothFunctionandCallableFunctionat every site, so a call in a loose program named the strict declaration.Function's member keeps it.tsconfig.jsonas its own program, so one case can hold a strict and a loose program.factory.get(k).bind(r)receivers, own-bindcontrols).Checked: case 82 oracle 10 / engine 16 → 10, extra 6 → 0; cases 21, 22, 79 unchanged; 8 real apps give identical edges before/after; TS suite 95 passed, 0 failed (on 0.1.8; cases 21/22/79/82 re-run on 0.1.9).
Closes #416