Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(types): better compatibility #115

Merged
merged 1 commit into from Nov 3, 2021
Merged

Conversation

posva
Copy link
Collaborator

@posva posva commented Nov 3, 2021

I think It would make sense to expose DebuggerEvent, VNode, and Plugin types to make them compatible with Vue 3. I'm not sure if types should be exposed individually or if there should be an export *.

Other types that I think should be added:

  • ComponentCustomProps
  • AllowedComponentProps
  • VNodeProps

There are useful for solar:

// example from vue-router-next (which doesn't require this as it is Vue 3 only)
export const RouterView = RouterViewImpl as unknown as {
  new (): {
    $props: AllowedComponentProps &
      ComponentCustomProps &
      VNodeProps &
      RouterViewProps

    $slots: {
      default: (arg: {
        Component: VNode
        route: RouteLocationNormalizedLoaded
      }) => VNode[]
    }
  }
}

@antfu antfu merged commit 9e981c7 into vueuse:master Nov 3, 2021
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.

None yet

2 participants