Skip to content

Commit cde07e7

Browse files
committed
wip
1 parent 47422d3 commit cde07e7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/runtime-core/src/apiDefineComponent.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ export type DefineComponent<
9898
directives?: Directives & GlobalDirectives
9999
expose?: Exposed[]
100100
provide?: Provide
101-
setup?: () => RawBindings
102-
data?: () => D
101+
setup?: (props: any, ctx: SetupContext) => RawBindings
102+
data?: (vm: any) => D
103103
__typeProps?: OptionsOrPropsOrPropOptions extends ComponentPropsOptions
104104
? unknown
105105
: OptionsOrPropsOrPropOptions
@@ -124,8 +124,8 @@ type InferComponentOptions<
124124
methods?: infer Methods
125125
mixins?: (infer Mixin)[]
126126
extends?: infer Extends
127-
setup?(): infer SetupBindings
128-
data?(): infer Data
127+
setup?(props: any, ctx: any): infer SetupBindings
128+
data?(vm: any): infer Data
129129
__typeProps?: infer TypeProps
130130
__typeEmits?: infer TypeEmits
131131
__typeRefs?: infer TypeRefs
@@ -141,6 +141,10 @@ type InferComponentOptions<
141141
* because the `__differentiator` will be different
142142
*/
143143
__differentiator?: keyof Data | keyof Computed | keyof Methods
144+
145+
// allow any custom options
146+
[key: string]: any
147+
144148
new (...args: any[]): ComponentPublicInstance<
145149
Readonly<
146150
ExtractPropTypes<

0 commit comments

Comments
 (0)