8000 feat(types): Better typescript support for emit `events` by pikax · Pull Request #2164 · vuejs/core · GitHub
[go: up one dir, main page]

Skip to content

feat(types): Better typescript support for emit events #2164

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

Open
wants to merge 16 commits into
base: minor
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor: fix test
  • Loading branch information
pikax committed Jul 16, 2021
commit 0cf01a5f8d67080ed8441ae8dbd27a0c50fb6ef4
4 changes: 2 additions & 2 deletions packages/runtime-core/src/h.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export function h<P, E extends EmitsOptions = {}, PP = {}, Props = {},Defaults =
type: DefineComponent<P, any, any, any, any, any, any, E, any, PP, Props, Defaults>,
props?: RenderProps<Partial<Defaults> & Omit<Props & PP, keyof Defaults>, E>,
children?: RawChildren | RawSlots
): P
): VNode
export function h(type: DefineComponent): VNode
export function h(type: DefineComponent, children?: RawChildren): VNode

Expand All @@ -203,7 +203,7 @@ export function h<P, E extends EmitsOptions = {}>(
type: Constructor<P>,
props?: RenderProps<P,E>,
children?: RawChildren | RawSlots
): ExtractEmitEvents<E>
): VNode
export function h(type: Constructor, children?: RawChildren): VNode


Expand Down
0