Skip to content
New issue

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

[@kbn/config-schema] Add extends to the documentation #185015

Closed
maryam-saeidi opened this issue Jun 7, 2024 · 1 comment · Fixed by #188906
Closed

[@kbn/config-schema] Add extends to the documentation #185015

maryam-saeidi opened this issue Jun 7, 2024 · 1 comment · Fixed by #188906
Labels
kbn/config-schema Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@maryam-saeidi
Copy link
Member

🍒 Summary

This ticket is about adding missing documentation for extends to the config-schema documentation.

Since it can be used for intersections, it would be nice to add such an example as well: (Example provided by @jloleysens )

const a = schema.object({ a: schema.string() });
const bKeys = { b: schema.string() };
const b = schema.object(bKeys);

//  C = A & B (intersection of A and B)
const c = a.extends(bKeys);

And in general, it would be great to have a table similar to io-ts to show the type equivalent in Typescript.

@maryam-saeidi maryam-saeidi added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Jun 7, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@maryam-saeidi maryam-saeidi changed the title [@kbn/config-schema] Add extends to the documentation [@kbn/config-schema] Add extends to the documentation Jun 7, 2024
pgayvallet added a commit that referenced this issue Jul 24, 2024
## Summary

Fix #185015

- add documentation for `ObjectType.extends`
- slight restructure of the sections and TOC to improve readability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kbn/config-schema Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants