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

Remove some anys from custom widgets #52

Merged
merged 2 commits into from
Sep 9, 2021

Conversation

joneshf-dd
Copy link
Collaborator

@joneshf-dd joneshf-dd commented Sep 8, 2021

We change how we define custom widget options so they can be typed a bit stricter and remove some anys in the process.

Docs PR: #16

We want to remove the `any` and be a bit more precise.

We split things into a base, boolean, and string interfaces. This allows
us to replace the `any` with the appropriate type for each `type`. This
also means that we can remove the `enum` entirely from
`WidgetOptionItemBoolean` (since there's no valid enumeration that isn't
`false`/`true`).
We want to remove the `any`.

Since we currently only allow string and boolean options, we can give
the type of `options` a more accurate type than `any`.
@joneshf-dd
Copy link
Collaborator Author

Thanks for the review!

@joneshf-dd joneshf-dd merged commit c994a0d into master Sep 9, 2021
@joneshf-dd joneshf-dd deleted the hardy.jones/remove-anys-from-custom-widgets branch September 9, 2021 17:02
@github-actions
Copy link
Contributor

github-actions bot commented Dec 14, 2021

Ignore this

There was an issue when setting up auto, the message is not correct.


🚀 PR was released in @datadog/ui-extensions-sdk@0.24.1 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants