소스 검색

💄 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>