-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Incomplete typedeclaration from 1.157.8 in @tanstack/router-core #6573
Copy link
Copy link
Closed
Labels
typesChanges to the typescript typesChanges to the typescript types
Description
Which project does this relate to?
Router
Describe the bug
From v1.157.8, the node_modules/@tanstack/router-core/dist/esm/path.d.ts file contains the following:
interface InterpolatePathOptions {
path?: string;
params: Record<string, unknown>;
/**
* A function that decodes a path parameter value.
* Obtained from `compileDecodeCharMap(pathParamsAllowedCharacters)`.
*/
decoder?: (encoded: string) => string;
}
export declare function interpolatePath({ path, params, decoder, server, }: InterpolatePathOptions): InterPolatePathResult;As you can see, InterpolatePathOptions has no server property. This causes our vite-build to fail with an error pointing to this file.
What's weird is that InterpolatePathOptions in node_modules/@tanstack/router-core/src/path.ts has the server field, so it should be there. 🤷
Your Example Website or App
Steps to Reproduce the Bug or Issue
Verified that the buggy code is present from 1.157.8 onwards by checking out the file dist/esm/path.d.ts via https://www.npmjs.com/package/@tanstack/router-core/v/1.157.8?activeTab=code
https://www.npmjs.com/package/@tanstack/router-core/v/1.157.7?activeTab=code shows the code without the server field.
Expected behavior
No build error.
Screenshots or Videos
No response
Platform
- @tanstack/router-core: 1.157.8 onwards
- OS: macOS
- Bundler: Vite
- Bundler Version: 7.3.1
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
typesChanges to the typescript typesChanges to the typescript types