Open SimenB opened 2 weeks ago
@chorobin @schiller-manuel is isolatedDeclarations
a flag we hope working with TSR?
Looking at the article linked, the solution to this seems to be the use of explicit types (and return types).
isolatedDeclarations
should be adopted on a case-by-case basis.
They do also mention this though 👆🏼.
Should we be looking at this now? or should we wait for Typescript 5.5 to be released and then added into our type-matrix in CI?
Note that this issue is specifically about the code generated by @tanstack/router-generator
output into the user's code base, not necessarily the router's own code base.
(in theory, this might improve type checking performance as well as noted in https://typescript-eslint.io/rules/explicit-module-boundary-types/, but my point was mainly to help/not block users from using the flag)
Describe the bug
Using
isolatedDeclarations
in the TypeScript 5.5 beta gives errors as it's not explicitly typed. Generating (and exporting) the type annotations would be nice.https://devblogs.microsoft.com/typescript/announcing-typescript-5-5-beta/#isolated-declarations
Your Example Website or App
https://github.com/SimenB/router-isolated-declarations
Steps to Reproduce the Bug or Issue
Run the TypeScript compiler in the linked reproduction
Expected behavior
No type errors.
Screenshots or Videos
No response
Platform
N/A
Additional context
No response