Skip to content

Access Data in render #191

Closed
Closed
@NikitaIT

Description

export function createComponent<
Props,
RawBindings = Data,
PropsOptions extends ComponentPropsOptions = ComponentPropsOptions
>(
// prettier-ignore
options: (
// prefer the provided Props, otherwise infer it from PropsOptions
HasDefined<Props> extends true
? ComponentOptionsWithProps<PropsOptions, RawBindings, Props>
: ComponentOptionsWithProps<PropsOptions, RawBindings>) &
Omit<Vue2ComponentOptions<Vue>, keyof ComponentOptionsWithProps<never, never>>
): VueProxy<PropsOptions, RawBindings>;

This is needed to get the return from setup to render as this.data // RawBindings.

Omit<Vue2ComponentOptions<Vue, RawBindings>

If now there is a way to do it right, I would like to know it.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions