Type error in region "setOptions" function
jaredgei opened this issue · 1 comments
jaredgei commented
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)```
katspaugh commented
Thanks! We should probably add it to the omitted prop list.