@lifeart/gxt
Version:
<img align="right" width="95" height="95" alt="Philosopher’s stone, logo of PostCSS" src="./public/logo.png">
16 lines (14 loc) • 864 B
TypeScript
import { DOMApi, ComponentLike, RootLike } from './types';
export declare const RENDERING_CONTEXT: unique symbol;
export declare const ROOT_CONTEXT: unique symbol;
export declare const API_FACTORY_CONTEXT: unique symbol;
export declare function context(contextKey: symbol): (klass: any, key: string, descriptor?: PropertyDescriptor & {
initializer?: () => any;
}) => void;
export declare function initDOM(ctx: ComponentLike | RootLike): DOMApi;
export declare function getDocument(ctx: ComponentLike | RootLike): Document;
export declare function getContext<T>(ctx: ComponentLike | RootLike, key: symbol,
/** Set to false for optional contexts that may not be provided */
required?: boolean): T | null;
export declare function cleanupFastContext(): void;
export declare function provideContext<T>(ctx: ComponentLike | RootLike, key: symbol, value: T): void;