Skip to content

Commit

Permalink
fix(react): add missing resolveComponent type in `createInertiaApp(…
Browse files Browse the repository at this point in the history
…)`, fixes ts(7006)
  • Loading branch information
jrson83 committed Apr 18, 2024
1 parent bb22517 commit fa98f18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/createInertiaApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ export default async function createInertiaApp<
const el = isServer ? null : document.getElementById(id)
// @ts-expect-error
const initialPage = page || JSON.parse(el.dataset.page)
// @ts-expect-error
const resolveComponent = (name) =>

const resolveComponent = (name: string) =>
// @ts-expect-error
Promise.resolve(resolve(name)).then((module) => module.default || module)

Expand Down

0 comments on commit fa98f18

Please sign in to comment.