@schema-render/core-react
Version:
Through a set of simple JSON Schema, efficiently build a set of forms.
16 lines (15 loc) • 573 B
TypeScript
import type { Ref, RefObject } from 'react';
import type { ICoreRef } from '../typings/core';
import type { IRootContext } from '../typings/rootContext';
export interface IOpenApiParams {
ref?: Ref<ICoreRef>;
rootElementRef: RefObject<HTMLDivElement>;
rootContextRef: RefObject<IRootContext>;
getValue: ICoreRef['getValue'];
setValue: ICoreRef['setValue'];
resetValue: ICoreRef['resetValue'];
}
/**
* 开放 API
*/
export default function useOpenApi({ ref, rootElementRef, rootContextRef, getValue, setValue, resetValue, }: IOpenApiParams): void;