Skip to content

typescript: read strictBindCallApply off the call site's module - #1783

Merged
swapnilpaliwal-sd merged 1 commit into
0.1.9from
loop/ty-is416
Sep 29, 2026
Merged

swapnilpaliwal-sd merged 1 commit into
0.1.9from
loop/ty-is416

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

In a project whose tsconfigs disagree on strictBindCallApply, call/apply/bind on a callable receiver answered both Function and CallableFunction at every site, so a call in a loose program named the strict declaration.

  • The flag now comes from the tsconfig governing the call site's module; a module no tsconfig claims keeps the project-wide hedge, and a receiver that reaches only Function's member keeps it.
  • The case oracle compiles each nested tsconfig.json as its own program, so one case can hold a strict and a loose program.
  • New case 82 (strict + loose program, typed factory.get(k).bind(r) receivers, own-bind controls).

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

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
swapnilpaliwal-sd merged commit dea9c11 into 0.1.9 Sep 29, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the loop/ty-is416 branch September 29, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant