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 new LooseAutocomplete type #37

Merged
merged 3 commits into from
Jun 13, 2023
Merged

Conversation

alexiglesias93
Copy link
Member

LooseAutocomplete

A type that allows for variable autocompletion with loose validation.

Example:

const f = (foo: LooseAutocomplete<'a' | 'b'>) => foo;
f(''); // VSCode autocomplete shows 'a' and 'b' as options, but doesn't fail when a different option is provided.
f('a'); // Valid
f('b'); // Valid
f('c'); // Valid

@alexiglesias93 alexiglesias93 added the enhancement New feature or request label Jun 13, 2023
@alexiglesias93 alexiglesias93 self-assigned this Jun 13, 2023
@alexiglesias93 alexiglesias93 merged commit 278d6fe into master Jun 13, 2023
@alexiglesias93 alexiglesias93 deleted the loose-autocomplete branch June 13, 2023 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant