Open mateja176 opened 3 years ago
I think this was fixed:
export interface RangeWithKey extends Range {
key: 'selection';
}
export type OnChangeProps = Range | { selection: RangeWithKey } | Date;
I think this was fixed:
export interface RangeWithKey extends Range { key: 'selection'; } export type OnChangeProps = Range | { selection: RangeWithKey } | Date;
still get error when use this type. say
Property 'selection' does not exist on type 'OnChangeProps'. Property 'selection' does not exist on type 'Date'.
Facing the same issue. @naufaldi were you able to get around this?
Need to use RangeKeyDict
Subject of the issue
Describe your issue here.
This is a type error, meaning that it does not impact the module's runtime. The prop
key
is missing in interfaceRange
.[BUG] Bug Reproduce Steps
Tell us how to reproduce this issue.
The above assumption is backed by the following evidence:
Whereas at runtime:
[BUG] Expected behaviour
The
Range
interface should be expanded to include thekey
. Like so:Perhaps a better alternative is to adjust the OnChangeProps type to:
Environment
Package Version: 1.1.3 React version: 16.9 Node version: 14 Browser: Chrome