IfElse.d.ts 651 B

123456789101112
  1. import IFragment from './IFragment';
  2. export declare type ConditionValue = boolean | string | number | null | undefined;
  3. export declare type Condition = ConditionValue | (() => ConditionValue);
  4. export declare function ifElse(condition: Condition, ifTrueFragment: string | IFragment, elseFragment?: string | IFragment): IfElse;
  5. export declare class IfElse implements IFragment {
  6. private readonly ifTrueFragment;
  7. private readonly elseFragment?;
  8. private readonly condition;
  9. constructor(condition: Condition, ifTrueFragment: string | IFragment, elseFragment?: string | IFragment);
  10. build(): string;
  11. }
  12. //# sourceMappingURL=IfElse.d.ts.map