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

DEV-102 feat: improve type handling #43

Merged
merged 1 commit into from
Oct 1, 2023

Conversation

nikbrunner
Copy link
Contributor

No description provided.

@nikbrunner nikbrunner self-assigned this Oct 1, 2023
@linear
Copy link

linear bot commented Oct 1, 2023

DEV-102 Handle optional fields in config

Since lua-ls now displays a missing-fields message I want to handle this properly.
I don't want to disable all these warnings, just because they are annoying. I wish there would be Type Helper Function like in TypeScript like Pick or Partial but that is not the case AFAIK. But appearently, although undocumented, it is possible to make fields optional, by adding a ? behind it. Since all the fields in config have an default, it also makes sense to make them optional.

Like this:

---field debug? boolean Enables the Debug Mode (Enables various debug messages)

@nikbrunner nikbrunner force-pushed the feature/dev-102-handle-optional-fields-in-config branch from 8d0d2ed to 0a409f3 Compare October 1, 2023 08:33
@nikbrunner nikbrunner merged commit b0b383b into main Oct 1, 2023
2 checks passed
@nikbrunner nikbrunner deleted the feature/dev-102-handle-optional-fields-in-config branch October 1, 2023 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant