UNPKG

radix-vue

Version:

Vue port for Radix UI Primitives.

11 lines (10 loc) 687 B
/** * The `useEmitAsProps` function is a TypeScript utility that converts emitted events into props for a * Vue component. * @param emit - The `emit` parameter is a function that is used to emit events from a component. It * takes two parameters: `name` which is the name of the event to be emitted, and `...args` which are * the arguments to be passed along with the event. * @returns The function `useEmitAsProps` returns an object that maps event names to functions that * call the `emit` function with the corresponding event name and arguments. */ export declare function useEmitAsProps<Name extends string>(emit: (name: Name, ...args: any[]) => void): Record<string, any>;