teslamotors / informed

A lightweight framework and utility for building powerful forms in React applications
https://teslamotors.github.io/informed
MIT License
949 stars 172 forks source link

Missed some properties in FormApi type #435

Closed AmirL closed 1 year ago

AmirL commented 1 year ago

export type FormApi in index.d.ts is missing 3 properties described in docs.

I've fixed it by extending it, but I think it would be right to add it to "index.d.ts"

interface FormApiFixed extends FormApi {
  disable: () => void;
  enable: () => void;
  fieldExists: (fieldName: string) => boolean;
}

const formApi: FormApiFixed = formApiRef.current;
joepuzzo commented 1 year ago

Ok I have fixed this and published a new version thanks!