-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
Description
Hi, great work on Remix 3 and thanks for publishing individual packages which can be used as needed.
I ran into some typescript troubles using the new fetch-router package. I created a small reproduction repo: https://github.com/GuptaSiddhant/fetch-router-test, and added a item resources.
In VSCode, the intellisence cannot infer type of the default id param in the RouteHandlers object.
- The
paramsobject has type(parameter) params: Simplify<ParamsFromTokens<A["protocol"], false> & ParamsFromTokens<A["hostname"], false> & ParamsFromTokens<A["pathname"], false>> - and the
params.idhas typeany(see attached screenshot)

- The result is same whether I use either
const handlers: RouteHandlers<typeof routes> = {...}const handlers = {...} satisfies RouteHandlers<typeof routes>
Env config:
- Editor: VSCode with 0 extensions enabled
- The reproduction project has only 2 dependencies -
@remix-run/fetch-router@^0.8.0andtypescript@^5.9.0. (VSCode uses typescript from repo's node_modules)- There are no errors while running typecheck and node-test (router works).
- Device: MacBook Pro M2-Pro 32GB RAM
This issue is re-opened since the last issue #10772 was resolved for me. Thanks in advance.