UNPKG

narraleaf-react

Version:

A React visual novel player framework

21 lines (20 loc) 974 B
import { LogicAction } from "../action/logicAction"; import { Actionable } from "../action/actionable"; import { Chained, Proxied } from "../action/chain"; import { LambdaHandler, ActionStatements } from "../elements/type"; export declare class Lambda<T = any> { } export declare class Condition<Closed extends true | false = false> extends Actionable { /** * @chainable */ static If(condition: Lambda | LambdaHandler<boolean>, action: ActionStatements): Proxied<Condition, Chained<LogicAction.Actions>>; /** * @chainable */ ElseIf(condition: Closed extends false ? (Lambda | LambdaHandler<boolean>) : never, action: Closed extends false ? ActionStatements : never): Closed extends false ? Proxied<Condition, Chained<LogicAction.Actions>> : never; /** * @chainable */ Else(action: Closed extends false ? ActionStatements : never): Closed extends false ? Proxied<Condition<true>, Chained<LogicAction.Actions>> : never; }