amis-rpc-design/node_modules/ansi-fragments/build/fragments/IfElse.d.ts

12 lines
651 B
TypeScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
import IFragment from './IFragment';
export declare type ConditionValue = boolean | string | number | null | undefined;
export declare type Condition = ConditionValue | (() => ConditionValue);
export declare function ifElse(condition: Condition, ifTrueFragment: string | IFragment, elseFragment?: string | IFragment): IfElse;
export declare class IfElse implements IFragment {
private readonly ifTrueFragment;
private readonly elseFragment?;
private readonly condition;
constructor(condition: Condition, ifTrueFragment: string | IFragment, elseFragment?: string | IFragment);
build(): string;
}
//# sourceMappingURL=IfElse.d.ts.map