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

feat(config): add partial types for each config option #549

Merged
merged 4 commits into from
Dec 15, 2024

Conversation

NStefan002
Copy link
Contributor

@NStefan002 NStefan002 commented Dec 13, 2024

As mentioned in #427, I added all of the partial config definitions to config/types_partial. I didn't create a Partial pair for very few of them (e.g. blink.cmp.KeymapConfig) because all of their fields are already optional.

If you want me to change something (split this into multiple files / remove fields' comments / etc. ), let me know.

Edit: these are the types after be3e9cf

@folke
Copy link
Contributor

folke commented Dec 15, 2024

fyi: a simple way to make a partial of a type is by doing:

---@class foo.partial: foo,{}

or just do:

---@param opts? blink.Opts|{}
function foo(opts)end

@NStefan002
Copy link
Contributor Author

@folke Thank you! I had no idea you could do it like that, I'll update it.

use `---@Class foo.partial: foo,{}` instead of defining
each field with `?`

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
@NStefan002
Copy link
Contributor Author

Ok, I realised some problems now, I'll fix it shortly...

@Saghen Saghen merged commit c3bba64 into Saghen:main Dec 15, 2024
@Saghen
Copy link
Owner

Saghen commented Dec 15, 2024

Thank you!

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.

3 participants