You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[isolatedDeclarations] function expressions as an argument to a function call that is exported are reported as needing an annotationΒ #62085
The function expressions are not directly exported so they should not be reported on at all.
This is causing ts-fix to insert many unnecessary annotations when codemodding the codebase at Canva because there's no way for it to tell that annotating the variable will silence the error on the function -- so it adds both annotations.
exportdeclarefunctionobserver<T>(component: T): T;exportdeclarefunctionaction<T>(fn: T): T;// ok()=>1;// also okobserver(()=>1);// error on both variable and functionexportconstnamed=observer(()=>1);// also error on both variable and functionexportconstthing=action(()=>named);// error on variable, but not functionexportconstthing2=action((): typeofnamed=>named);
Activity
KisaragiEffective commentedon Jul 18, 2025
Here's self-contained example based on yours:
maybe changed in #59282 , according history from https://github.com/microsoft/TypeScript/blame/2778e84ed88894156e2c5a17d74a25c73cc96ffe/tests/baselines/reference/isolatedDeclarationErrors.errors.txt#L3
Fix isolated declarations to not flag function expressions in call arβ¦