浏览代码

💄 style(test-utils): add type ignore comments for Route components

- add @ts-ignore comment for mapped Route components
- add @ts-ignore comment for catch-all Route component
yourname 1 月之前
父节点
当前提交
309bef2ad4
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      packages/test-utils/src/client/test-router.tsx

+ 2 - 0
packages/test-utils/src/client/test-router.tsx

@@ -18,8 +18,10 @@ export function TestRouter({
     <MemoryRouter initialEntries={[initialPath]}>
       <Routes>
         {routes.map((route, index) => (
+          // @ts-ignore
           <Route key={index} path={route.path} element={route.element} />
         ))}
+        {/* @ts-ignore */}
         <Route path="*" element={children} />
       </Routes>
     </MemoryRouter>