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

Added type for LightArgs.levelConfig #8724

Merged
merged 4 commits into from
Feb 4, 2025
Merged

Conversation

mccordscvs
Copy link
Contributor

In modernExtend the interface LightArgs.levelConfig.disableFeatures uses a generic string[] type. This argument is tightly bound to 6 options but there is no autocomplete for it.

I exported a new type called LevelConfigFeatures form types.
Applied the type to:

  • exposes.Light.withLevelConfig
  • modernExtend.LightArgs.LevelConfig.disableFeatures
  • lib/ikea.ts ikeaLight Function

I thought the best option would be to apply the type directly to withLevelConfig and work out from there instead of just applying it the interface. I debated weather to export directly form extend.ts but decided types.ts was the best option. If you want any changes let me know.

@Koenkk
Copy link
Owner

Koenkk commented Feb 4, 2025

Thanks!

@Koenkk Koenkk merged commit 8dc7622 into Koenkk:master Feb 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants