@lifeart/gxt
Version:
<img align="right" width="95" height="95" alt="Philosopher’s stone, logo of PostCSS" src="./public/logo.png">
34 lines (33 loc) • 1.66 kB
TypeScript
import { type GenericReturnType, type Component } from '../component';
import { Destructors } from '../glimmer/destroyable';
import { type Cell, type MergedCell } from '../reactive';
import { $context, RENDERED_NODES_PROPERTY, COMPONENT_ID_PROPERTY } from '../shared';
export declare class IfCondition {
args: {
[$context]: Component<any>;
};
isDestructorRunning: boolean;
prevComponent: GenericReturnType | null;
condition: MergedCell | Cell<boolean>;
destructors: Destructors;
runNumber: number;
lastValue: boolean;
target: DocumentFragment | HTMLElement;
placeholder: Comment;
throwedError: Error | null;
destroyPromise: Promise<any> | null;
[RENDERED_NODES_PROPERTY]: never[];
[COMPONENT_ID_PROPERTY]: number;
trueBranch: (ifContext: Component<any>) => GenericReturnType;
falseBranch: (ifContext: Component<any>) => GenericReturnType;
constructor(parentContext: Component<any>, maybeCondition: Cell<boolean>, target: DocumentFragment | HTMLElement, placeholder: Comment, trueBranch: (ifContext: Component<any>) => GenericReturnType, falseBranch: (ifContext: Component<any>) => GenericReturnType);
checkStatement(value: boolean): true | undefined;
reInit(): Promise<void>;
syncState(value: unknown): void;
renderBranch(nextBranch: (ifContext: Component<any>) => GenericReturnType, runNumber: number): void;
validateEpoch(runNumber: number): boolean;
destroyBranch(): Promise<void>;
renderState(nextBranch: (ifContext: Component<any>) => GenericReturnType): void;
destroy(): Promise<void>;
setupCondition(maybeCondition: Cell<boolean>): void;
}