Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Incompatibility When Using SuperJSON with createRouter Transformer #3152

Open
Deer404 opened this issue Jan 13, 2025 · 0 comments
Open

Comments

@Deer404
Copy link

Deer404 commented Jan 13, 2025

Which project does this relate to?

Router

Describe the bug

When attempting to configure SuperJSON as a transformer in createRouter within the basic-ssr-streaming-file-based example, TypeScript type errors prevent implementation following the expected code structure.
ts error log

Type 'typeof SuperJSON' is missing the following properties from type 'RouterTransformer': 
- 'encode'
- 'decode'

Your Example Website or App

https://github.com/TanStack/router/tree/main/examples/react/basic-ssr-streaming-file-based

Steps to Reproduce the Bug or Issue

  1. Clone the example repository
  2. Navigate to basic-ssr-streaming-file-based example
  3. Try to implement the router with SuperJSON transformer (The source code is like this)

Expected behavior

Type safe

Screenshots or Videos

No response

Platform

  • OS: macOS 15.0.1
  • Browser: Chrome version: 131.0.6778.205
  • Editor: VS CODE

Additional context

No response

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

No branches or pull requests

1 participant