UNPKG

@oiij/naive-ui

Version:

Som Composable Functions And Components for Vue 3

58 lines (57 loc) 3.1 kB
import { RemoteRequestEmits, RemoteRequestProps, RObject } from './index'; declare const _default: <P extends RObject, D extends RObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{ readonly onError?: ((err: Error, params: P[]) => any) | undefined; readonly onSuccess?: ((data: D, params: P[]) => any) | undefined; readonly onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined; readonly onBefore?: ((params: P[]) => any) | undefined; } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onError" | "onSuccess" | "onFinally" | "onBefore"> & RemoteRequestProps<P, D> & Partial<{}>> & import('vue').PublicProps; expose(exposed: import('vue').ShallowUnwrapRef<{ refs: { loading: Readonly<import('vue').Ref<boolean, boolean>>; data: Readonly<import('vue').Ref<D | undefined, D | undefined>>; error: Readonly<import('vue').Ref<Error | undefined, Error | undefined>>; params: Readonly<import('vue').Ref<[] | P[], [] | P[]>>; }; actions: { run: (...params: P[]) => void; runAsync: (...params: P[]) => Promise<D>; refresh: () => void; refreshAsync: () => Promise<D>; cancel: () => void; mutate: (data?: D | ((oldData?: D | undefined) => D | undefined) | undefined) => void; setParam: (_params: Partial<P>) => void; runParam: (_params: Partial<P>) => void; runParamAsync: (_params: Partial<P>) => Promise<D>; }; }>): void; attrs: any; slots: { default?(_: { refs: { loading: Readonly<import('vue').Ref<boolean, boolean>>; data: Readonly<import('vue').Ref<D | undefined, D | undefined>>; error: Readonly<import('vue').Ref<Error | undefined, Error | undefined>>; params: Readonly<import('vue').Ref<[] | P[], [] | P[]>>; }; actions: { run: (...params: P[]) => void; runAsync: (...params: P[]) => Promise<D>; refresh: () => void; refreshAsync: () => Promise<D>; cancel: () => void; mutate: (data?: D | ((oldData?: D | undefined) => D | undefined) | undefined) => void; setParam: (_params: Partial<P>) => void; runParam: (_params: Partial<P>) => void; runParamAsync: (_params: Partial<P>) => Promise<D>; }; }): any; }; emit: RemoteRequestEmits<P, D>; }>) => import('vue').VNode & { __ctx?: Awaited<typeof __VLS_setup>; }; export default _default; type __VLS_PrettifyLocal<T> = { [K in keyof T]: T[K]; } & {};