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

Type error in region "setOptions" function #3873

Open
jaredgei opened this issue Sep 19, 2024 · 1 comment
Open

Type error in region "setOptions" function #3873

jaredgei opened this issue Sep 19, 2024 · 1 comment
Labels

Comments

@jaredgei
Copy link

Bug description

The typescript type for region.setOptions requires "start" to be specified, even though there is specific code to handle "start" being undefined.

Minimal code snippet

region.setOptions({ color: getColor(word) });
doesn't work ^

region.setOptions({ color: getColor(word), start: region.start });
works ^

Obtained result

  Property 'start' is missing in type '{ color: string; }' but required in type 'Omit<RegionParams, "minLength" | "maxLength">'.ts(2345)```
@jaredgei jaredgei added the bug label Sep 19, 2024
@katspaugh
Copy link
Owner

Thanks! We should probably add it to the omitted prop list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants