Skip to content

Commit 12573a1

Browse files
committed
Update onChange typing to include default type
The default value that is returned to the onChange handler is null, which is not covered in this current type definition.
1 parent e78a62e commit 12573a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ declare module "rc-time-picker" {
2626
disabledSeconds?: (hour: number, minute: number) => number[];
2727
use12Hours?: boolean;
2828
hideDisabledOptions?: boolean;
29-
onChange?: (newValue: Moment) => void;
29+
onChange?: (newValue: Moment | null) => void;
3030
onAmPmChange?: (ampm: 'PM' | 'AM') => void;
3131
addon?: (instance: typeof Panel) => React.ReactNode;
3232
placement?: string;

0 commit comments

Comments
 (0)