control.d.ts 504 B

123456789101112131415
  1. declare type ControlInstance = {
  2. controlled: boolean;
  3. initValue: any;
  4. set(newVal: any, extObj?: Object, fn?: any): void;
  5. get(): any;
  6. change(newVal: any, customChangeData?: any, customUpdateFn?: any): void;
  7. };
  8. declare type ControlOption = {
  9. valueKey?: string;
  10. defaultValueKey?: string;
  11. changeEventName?: string;
  12. strict?: boolean;
  13. };
  14. declare function useControl(this: any, option?: ControlOption): ControlInstance;
  15. export { ControlOption, ControlInstance, useControl };