Skip to content

Commit

Permalink
fix: add ts-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
baozouai committed Jun 17, 2023
1 parent 17fdef1 commit f7718d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/genetate-history-method-webpack-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export const useRouterHistory = () => {
})
useLayoutEffect(() => {
// @ts-ignore
history.listen(setState)
}, [history])
return [history, state] ${isExistTS ? 'as [typeof history, typeof state]' : ''}
Expand All @@ -171,8 +172,10 @@ export const useSearchParams = ${isExistTS ? '<T = any>' : ''}() => {
export function Router({ children }${isExistTS ? ':{children: ReactNode}' : ''}) {
return (
<BaseRouter
// @ts-ignore
children={children}
history={originHistory${isExistTS ? ' as any' : ''}}
// @ts-ignore
history={originHistory}
/>
)
}`,
Expand Down

0 comments on commit f7718d2

Please sign in to comment.