We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As reported by @rylnd in #60567, the FormSchema interface does not narrow the index signature.
FormSchema
The changes he proposes are
-export interface FormSchema<T extends FormData = FormData> { - [key: string]: FormSchemaEntry<T>; -} +export type FormSchema<T extends FormData = FormData> = { + [K in keyof T]: FormSchemaEntry<T[K]>; +};
The text was updated successfully, but these errors were encountered:
Pinging @elastic/es-ui (Team:Elasticsearch UI)
Sorry, something went wrong.
[Form lib] Improve TS typing for FormSchema
2d1f28a
The typings for the FromSchema was too permissive and did not limit the keys to the form interface provided. Fixes elastic#60602
1c91998
5265bdd
Successfully merging a pull request may close this issue.
As reported by @rylnd in #60567, the
FormSchema
interface does not narrow the index signature.The changes he proposes are
The text was updated successfully, but these errors were encountered: