UNPKG

chai-latte

Version:

Build expressive & readable fluent interface libraries.

70 lines (66 loc) 1.61 kB
/* ------------------------------------ * Generated by chai-latte * Please do not edit this file directly * Instead, edit the file './fixtures' * ------------------------------------ */ import builder from './fixtures'; type Expressions = typeof builder.__expressions; type ExpressionCallback<Idx extends number> = Expressions[Idx][0]['callback']; type Arg<Idx extends number, ArgIndex extends number> = Parameters<ExpressionCallback<Idx>>[ArgIndex]; type Return<Idx extends number> = ReturnType<ExpressionCallback<Idx>>; type Root = { the: { man: { is: { alive: { (bool: Arg<0, 0>) : { and: { well: { (bool: Arg<0, 1>) : Return<0>; }; }; }; }; }; }; (bool: Arg<1, 0>) : { and: { well: { (bool: Arg<1, 1>) : Return<1>; }; very: { well: { (bool: Arg<1, 1>) : Return<1>; }; }; realy: { well: { (bool: Arg<1, 1>) : Return<1>; }; }; }; }; }; given: { (state: Arg<2, 0>) : { when: { (event: Arg<2, 1>) : { then: { it: { becomes: { (state: Arg<2, 2>) : Return<2>; }; does: { (action: Arg<3, 2>) : Return<3>; }; }; (state: Arg<2, 2>) : Return<2>; (action: Arg<3, 2>) : Return<3>; }; }; }; }; }; }; export default builder as unknown as Root;