Skip to content

Accept Vue's App in withInertiaModal() - #274

Open
Bosphoramus wants to merge 1 commit into
inertiaui:3.xfrom
Bosphoramus:fix/with-inertia-modal-app-type
Open

Bosphoramus wants to merge 1 commit into
inertiaui:3.xfrom
Bosphoramus:fix/with-inertia-modal-app-type

Conversation

@Bosphoramus

@Bosphoramus Bosphoramus commented Aug 8, 2026 •

Copy link
Copy Markdown

The parameter only accepted { _component: { render?: () => VNode } }, but withApp() hands over Vue's App, whose _component.render is a plain Function. That mismatch made the documented setup impossible to typecheck.

Widened to a union so the old shape still works, and moved the cast inside the function (No runtime change).

Screenshot 2026-08-08 at 22 36 50
Argument of type 'App<any>' is not assignable to parameter of type '{ _component: { render?: (() => VNode<RendererNode, RendererElement, { [key: string]: any; }>) | undefined; }; }'.
  Types of property '_component' are incompatible.
    Type 'ConcreteComponent<{}, any, any, ComputedOptions, MethodOptions, {}, any>' is not assignable to type '{ render?: (() => VNode<RendererNode, RendererElement, { [key: string]: any; }>) | undefined; }'.
      Value of type 'FunctionalComponent<{}, {}, any, {}>' has no properties in common with type '{ render?: (() => VNode<RendererNode, RendererElement, { [key: string]: any; }>) | undefined; }'. Did you mean to call it?

The parameter only accepted `{ _component: { render?: () => VNode } }`, but
`withApp()` hands over Vue's `App`, whose `_component.render` is a plain
`Function`. That mismatch made the documented setup impossible to typecheck.

Widened to a union so the old shape still works, and moved the cast inside
the function. No runtime change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant