error TS2344 without skipLibCheck: true
Hi. I'm getting these errors when
skipLibCheck is not true in my tsconfig.json. The literals in the union are paths of the direct children of my RootRoute. Is there a good way to avoid these errors without enabling skipLibCheck?
node_modules/.pnpm/@tanstack+router@0.0.1-beta.119_react-dom@18.2.0_react@18.2.0/node_modules/@tanstack/router/build/types/react.d.ts:23:106 - error TS2344: Type 'TFrom' does not satisfy the constraint '"" | "/" | "/dashboard"'.
Type 'string' is not assignable to type '"" | "/" | "/dashboard"'.
23 export type MakeLinkPropsOptions<TFrom extends string = '/', TTo extends string = ''> = LinkPropsOptions<TFrom, TTo> & React.AnchorHTMLAttributes<HTMLAnchorElement>;
~~~~~
node_modules/.pnpm/@tanstack+router@0.0.1-beta.119_react-dom@18.2.0_react@18.2.0/node_modules/@tanstack/router/build/types/react.d.ts:79:127 - error TS2344: Type 'TFrom' does not satisfy the constraint '"" | "/" | "/dashboard"'.
Type 'string' is not assignable to type '"" | "/" | "/dashboard"'.
79 export declare function useMatchRoute(): <TFrom extends string = "/", TTo extends string = "">(opts: MakeUseMatchRouteOptions<TFrom, TTo>) => any;
~~~~~
node_modules/.pnpm/@tanstack+router@0.0.1-beta.119_react-dom@18.2.0_react@18.2.0/node_modules/@tanstack/router/build/types/react.d.ts:80:118 - error TS2344: Type 'TFrom' does not satisfy the constraint '"" | "/" | "/dashboard"'.
Type 'string' is not assignable to type '"" | "/" | "/dashboard"'.
80 export declare function MatchRoute<TFrom extends string = '/', TTo extends string = ''>(props: MakeMatchRouteOptions<TFrom, TTo>): any;
~~~~~
node_modules/.pnpm/@tanstack+router@0.0.1-beta.119_react-dom@18.2.0_react@18.2.0/node_modules/@tanstack/router/build/types/react.d.ts:23:106 - error TS2344: Type 'TFrom' does not satisfy the constraint '"" | "/" | "/dashboard"'.
Type 'string' is not assignable to type '"" | "/" | "/dashboard"'.
23 export type MakeLinkPropsOptions<TFrom extends string = '/', TTo extends string = ''> = LinkPropsOptions<TFrom, TTo> & React.AnchorHTMLAttributes<HTMLAnchorElement>;
~~~~~
node_modules/.pnpm/@tanstack+router@0.0.1-beta.119_react-dom@18.2.0_react@18.2.0/node_modules/@tanstack/router/build/types/react.d.ts:79:127 - error TS2344: Type 'TFrom' does not satisfy the constraint '"" | "/" | "/dashboard"'.
Type 'string' is not assignable to type '"" | "/" | "/dashboard"'.
79 export declare function useMatchRoute(): <TFrom extends string = "/", TTo extends string = "">(opts: MakeUseMatchRouteOptions<TFrom, TTo>) => any;
~~~~~
node_modules/.pnpm/@tanstack+router@0.0.1-beta.119_react-dom@18.2.0_react@18.2.0/node_modules/@tanstack/router/build/types/react.d.ts:80:118 - error TS2344: Type 'TFrom' does not satisfy the constraint '"" | "/" | "/dashboard"'.
Type 'string' is not assignable to type '"" | "/" | "/dashboard"'.
80 export declare function MatchRoute<TFrom extends string = '/', TTo extends string = ''>(props: MakeMatchRouteOptions<TFrom, TTo>): any;
~~~~~
1 Reply
manual-pink•3y ago
I’ll look into This