inferno
Version:
An extremely fast, React-like JavaScript library for building modern user interfaces
56 lines (55 loc) • 2.32 kB
TypeScript
import type { Inferno, InfernoNode, IComponent, VNode } from './types';
export declare function rerender(): void;
export type ComponentType<P = Record<string, unknown>> = typeof Component<P> | Inferno.StatelessComponent<P>;
export declare abstract class Component<P = Record<string, unknown>, S = Record<string, unknown>> implements IComponent<P, S> {
state: Readonly<S | null>;
props: Readonly<{
children?: InfernoNode;
}> & Readonly<P>;
context: any;
displayName?: string;
$BR: boolean;
$BS: boolean;
$PS: Partial<S> | null;
$LI: any;
$UN: boolean;
$CX: any;
$QU: Array<() => void> | null;
$N: boolean;
$SSR?: boolean;
$L: Array<() => void> | null;
$SVG: boolean;
$F: boolean;
constructor(props?: P, context?: any);
forceUpdate(callback?: (() => void) | undefined): void;
setState<K extends keyof S>(newState: ((prevState: Readonly<S>, props: Readonly<{
children?: InfernoNode;
} & P>) => Pick<S, K> | S | null) | (Pick<S, K> | S | null), callback?: () => void): void;
componentDidMount?(): void;
componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly<{
children?: InfernoNode;
} & P>, nextContext: any): void;
shouldComponentUpdate?(nextProps: Readonly<{
children?: InfernoNode;
} & P>, nextState: Readonly<S>, context: any): boolean;
componentWillUpdate?(nextProps: Readonly<{
children?: InfernoNode;
} & P>, nextState: Readonly<S>, context: any): void;
componentDidUpdate?(prevProps: Readonly<{
children?: InfernoNode;
} & P>, prevState: Readonly<S>, snapshot: any): void;
componentWillUnmount?(): void;
componentDidAppear?(domNode: Element): void;
componentWillDisappear?(domNode: Element, callback: () => void): void;
componentWillMove?(parentVNode: VNode, parentDOM: Element, dom: Element): void;
getChildContext?(): void;
getSnapshotBeforeUpdate?(prevProps: Readonly<{
children?: InfernoNode;
} & P>, prevState: Readonly<S>): any;
static defaultProps?: Record<string, unknown> | null;
static getDerivedStateFromProps?(nextProps: any, state: any): any;
render(props: Readonly<{
children?: InfernoNode;
} & P>, state: Readonly<S>, context: any): InfernoNode;
}