breaking(number-input): type value as null | number (#1044)

Fixes #1039
This commit is contained in:
metonym 2022-01-27 06:57:32 -08:00 committed by GitHub
commit 9e915cf90a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 58 additions and 58 deletions

View file

@ -12,10 +12,11 @@ export interface NumberInputProps
size?: "sm" | "xl";
/**
* Specify the input value
* @default ""
* Specify the input value.
* Use `null` to denote "no value"
* @default null
*/
value?: number | string;
value?: null | number;
/**
* Specify the step increment
@ -147,7 +148,7 @@ export interface NumberInputProps
export default class NumberInput extends SvelteComponentTyped<
NumberInputProps,
{
change: CustomEvent<number>;
change: CustomEvent<null | number>;
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];