declare namespace JSX { export type IntrinsicElements = { [index: string]: any }; } declare function h( type: string, props?: { [index: string]: any } | null, ...children: (HTMLElement | string)[] ): Node; type DLPointer = { readonly __symbol: unique symbol, readonly __signature: T }; declare function use(sink: T, mapping?: (arg: T) => any): DLPointer; declare function useValue(trap: DLPointer): T; type Stateful = T & { readonly symbol: unique symbol }; declare function stateful(target: T): Stateful; declare function handle(references: DLPointer, callback: (value: T) => void): void; declare function css(strings: TemplateStringsArray, ...values: any): string; declare function rule(strings: TemplateStringsArray, ...values: any): string; declare var styled: { new: typeof css, rule: typeof rule }; type DLCSS = string; declare var $el: HTMLElement; interface Element { $: OuterComponentTypes & { [index: string | symbol]: any } } interface DLElement extends Element { $: T & OuterComponentTypes } type ComponentElement any> = DLElement>; type OuterComponentTypes = { root: Element, children: Element[], } type InnerComponentTypes = { css: DLCSS, mount?: () => void, } type ComponentTypes = OuterComponentTypes & InnerComponentTypes; type Component = ((this: Public & Private & ComponentTypes, _props: Public) => DLElement);