Skip to content

Commit

Permalink
chore: rename and export DefineSetupFnComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Feb 25, 2024
1 parent e0e0253 commit 6c74fb0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/runtime-core/src/apiDefineComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export type DefineComponent<
> &
PP

type DirectSetupComponent<
export type DefineSetupFnComponent<
P extends Record<string, any>,
E extends EmitsOptions = {},
S extends SlotsType = SlotsType,
Expand Down Expand Up @@ -135,7 +135,7 @@ export function defineComponent<
emits?: E | EE[]
slots?: S
},
): DirectSetupComponent<Props, E, S>
): DefineSetupFnComponent<Props, E, S>
export function defineComponent<
Props extends Record<string, any>,
E extends EmitsOptions = {},
Expand All @@ -151,7 +151,7 @@ export function defineComponent<
emits?: E | EE[]
slots?: S
},
): DirectSetupComponent<Props, E, S>
): DefineSetupFnComponent<Props, E, S>

// overload 2: object format with no props
// (uses user defined props interface)
Expand Down
6 changes: 5 additions & 1 deletion packages/runtime-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ export type {
AllowedComponentProps,
ComponentInstance,
} from './component'
export type { DefineComponent, PublicProps } from './apiDefineComponent'
export type {
DefineComponent,
DefineSetupFnComponent,
PublicProps,
} from './apiDefineComponent'
export type {
ComponentOptions,
ComponentOptionsMixin,
Expand Down

0 comments on commit 6c74fb0

Please sign in to comment.