fix(types): dispatched events without a detail value should be null (#1124)

Currently, dispatched events without `e.detail` have a type of `any`.

We can be more specific as a `CustomEvent` detail value is `null`.
This commit is contained in:
metonym 2022-02-21 09:42:42 -08:00 committed by GitHub
commit 714f47a635
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 97 additions and 93 deletions

View file

@ -43,9 +43,9 @@ export interface HeaderSearchProps
export default class HeaderSearch extends SvelteComponentTyped<
HeaderSearchProps,
{
active: CustomEvent<any>;
inactive: CustomEvent<any>;
clear: CustomEvent<any>;
active: CustomEvent<null>;
inactive: CustomEvent<null>;
clear: CustomEvent<null>;
select: CustomEvent<{
value: string;
selectedResultIndex: number;