allow Element to be inferred and constrained

pull/7121/head
Ignatius Bagus 5 years ago
parent e31a7cdf52
commit 336872dfd7
No known key found for this signature in database
GPG Key ID: 357C6674A45CC06B

@ -3,6 +3,6 @@ export interface ActionReturn<Parameters = any> {
destroy?: () => void;
}
export interface Action<Parameters = any> {
(node: HTMLElement, parameters?: Parameters): void | ActionReturn<Parameters>;
export interface Action<Parameters = any, Element = HTMLElement> {
<Node extends Element>(node: Node, parameters?: Parameters): void | ActionReturn<Parameters>;
}

Loading…
Cancel
Save