import { Component } from './component'; import { Injector } from './injector'; export declare type GetMount = (host: Component, scope: Scope) => MountBlock | undefined; export interface MountTemplate { (host: Component, scope: Scope): UpdateTemplate | undefined; dispose?: UnmountBlock; } export declare type UpdateTemplate = (host: Component, scope: Scope) => number | void; export interface MountBlock { (host: Component, injector: Injector, data: D): UpdateBlock | undefined; dispose?: UnmountBlock; } export declare type UpdateBlock = (host: Component, data: D) => number | void; export declare type UnmountBlock = (scope: Scope, host: Component) => void; export interface Scope { [key: string]: any; } export declare type Data = object; export interface ChangeSet { prev: { [name: string]: T | null; }; cur: { [name: string]: T | null; }; } export declare type Changes = { [P in keyof T]?: { current: T[P] | null; prev: T[P] | null; }; }; export declare type ComponentEventListener = (host: Component, event: Event, target: Element, scope: Scope) => void; export interface EventBinding extends EventListenerObject { host: Component; scope: Scope; target: Element; listener?: ComponentEventListener; pending?: ComponentEventListener; }