Closed livwvil closed 2 months ago
which typescript version are you using?
Just updated: "typescript": "^4.9.5"
I think that's the whole point. According to playground TS 4.9.5 does not support the const keyword Should we count on backward compatibility?
my bad effectively I got the error because of a compiler which was compiling in typescript 4.7.4 If you update with 5.x.x the error disappear but it would be great this was stated
I think we should just state that the minimal required TS version is v5.0
I think we should just state that the minimal required TS version is v5.0
Do you think it is the only way?
Yes
docs are updated with:
I think we should just state that the minimal required TS version is v5.0
Do you think it is the only way?
another solution would be : export declare function createLink
We only want to support TS 5.0 and upwards for other reasons too
For those who may need there is a patch file if you're working under typescript < 5.x.x
`
diff --git a/node_modules/@tanstack/react-router/dist/esm/link.d.ts b/node_modules/@tanstack/react-router/dist/esm/link.d.ts
index b523933..b9113bd 100644
--- a/node_modules/@tanstack/react-router/dist/esm/link.d.ts
+++ b/node_modules/@tanstack/react-router/dist/esm/link.d.ts
@@ -91,6 +91,6 @@ type LinkComponent
`
Describe the bug
There is wrong types in link.d.ts:
My ts says:
ERROR(TypeScript) Declaration or statement expected.
Your Example Website or App
nope
Steps to Reproduce the Bug or Issue
Expected behavior
No errors displayed
Screenshots or Videos
No response
Platform
Additional context
I have no this errors on "@tanstack/react-router": "^1.19.1"