diff --git a/lib/Rung.ts b/lib/Rung.ts index d311c63..00fdf2b 100644 --- a/lib/Rung.ts +++ b/lib/Rung.ts @@ -2,12 +2,12 @@ import {SubNode} from "./helpers"; export type RungOptions = {}; -export default abstract class Rung { - protected node: Node | null = null; +export default abstract class Rung { + protected node: NodeType | null = null; protected constructor(options: RungOptions) {} - render(): Node { + render(): NodeType { if (!this.node) { this.node = this.build(); } @@ -28,7 +28,7 @@ export default abstract class Rung { } } - protected abstract build(): Node; + protected abstract build(): NodeType; } -export type FunctionalRung, N extends HTMLElement> = (attributes: Props, subNodes?: SubNode[]) => N; +export type FunctionalRung, N extends Node = Node> = (attributes: Props, subNodes?: SubNode[]) => N;