remove `extends any`

pull/7347/head
Ivan Hofer 5 years ago
parent 7303f2fdc7
commit 4733566de2

@ -734,7 +734,7 @@ export function get_custom_elements_slots(element: HTMLElement) {
} }
type ActionWithParams<Node extends HTMLElement = HTMLElement, Params extends any = any> = ( type ActionWithParams<Node extends HTMLElement = HTMLElement, Params = any> = (
node: Node, node: Node,
options: Params options: Params
) => { ) => {
@ -746,6 +746,6 @@ type ActionWithoutParams<Node extends HTMLElement = HTMLElement> = (node: Node)
destroy?: () => void destroy?: () => void
} }
export type Action<Node extends HTMLElement = HTMLElement, Params extends any = void> = void extends Params export type Action<Node extends HTMLElement = HTMLElement, Params = void> = void extends Params
? ActionWithoutParams<Node> ? ActionWithoutParams<Node>
: ActionWithParams<Node, Params> : ActionWithParams<Node, Params>

Loading…
Cancel
Save