Refactor prop types to omit redundant null for null | HTMLElement types (#998)

* refactor: omit redundant `null` prop type for HTMLElements

* yarn build:lib

* test: assert updated element prop types
This commit is contained in:
Eric Liu 2022-01-12 13:36:47 -10:00 committed by GitHub
commit 6de73f86fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 40 additions and 35 deletions

View file

@ -135,7 +135,7 @@ export interface ComboBoxProps
* Obtain a reference to the list HTML element
* @default null
*/
listRef?: null | HTMLDivElement;
listRef?: HTMLDivElement;
}
export default class ComboBox extends SvelteComponentTyped<

View file

@ -8,7 +8,7 @@ export interface ContextMenuProps
* If no element is specified, the context menu applies to the entire window
* @default null
*/
target?: null | HTMLElement | HTMLElement[];
target?: HTMLElement | HTMLElement[];
/**
* Set to `true` to open the menu

View file

@ -37,7 +37,7 @@ export interface ToolbarSearchProps
* Obtain a reference to the input HTML element
* @default null
*/
ref?: null | HTMLInputElement;
ref?: HTMLInputElement;
}
export default class ToolbarSearch extends SvelteComponentTyped<

View file

@ -197,13 +197,13 @@ export interface MultiSelectProps
* Obtain a reference to the field box element
* @default null
*/
fieldRef?: null | HTMLDivElement;
fieldRef?: HTMLDivElement;
/**
* Obtain a reference to the selection element
* @default null
*/
selectionRef?: null | HTMLDivElement;
selectionRef?: HTMLDivElement;
}
export default class MultiSelect extends SvelteComponentTyped<