Closed Borber closed 8 months ago
Source File: https://github.com/Borber/tran/blob/master/src/index.tsx
Written according to the official example, vscode reports an error, but it can be compiled and the behavior is as expected
Type '{ path: string; component: (() => Element) & { preload: () => Promise<{ default: () => Element; }>; }; }[]' is not assignable to type 'Element'. Type '{ path: string; component: (() => Element) & { preload: () => Promise<{ default: () => Element; }>; }; }[]' is not assignable to type 'ArrayElement'. Type '{ path: string; component: (() => JSX.Element) & { preload: () => Promise<{ default: () => JSX.Element; }>; }; }' is not assignable to type 'Element'.ts(2322) components.d.ts(6, 5): The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & BaseRouterProps & { url?: string | undefined; actionBase?: string | undefined; explicitLinks?: boolean | undefined; preload?: boolean | undefined; }' [Codeium: Explain Problem](vscode-file://vscode-app/c:/Users/BORBER/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) const routes: { path: string; component: (() => JSX.Element) & { preload: () => Promise<{ default: () => JSX.Element; }>; }; }[]
https://github.com/Borber/tran/blob/master/src/index.tsx
Edit with vscode
As expected, but the editor reported an error
No response
Fixed in 0.10.2
Describe the bug
Source File: https://github.com/Borber/tran/blob/master/src/index.tsx
Written according to the official example, vscode reports an error, but it can be compiled and the behavior is as expected
Your Example Website or App
https://github.com/Borber/tran/blob/master/src/index.tsx
Steps to Reproduce the Bug or Issue
Edit with vscode
Expected behavior
As expected, but the editor reported an error
Screenshots or Videos
Platform
Additional context
No response