( condition: (c: ChibiGenerator<any>) => ChibiJson<boolean>, method1, method2, )
| 55 | } |
| 56 | |
| 57 | function conditionalMethod( |
| 58 | condition: (c: ChibiGenerator<any>) => ChibiJson<boolean>, |
| 59 | method1, |
| 60 | method2, |
| 61 | ) { |
| 62 | const temp1 = method1; |
| 63 | const temp2 = method2; |
| 64 | return ($c: ChibiGenerator<any>) => { |
| 65 | return $c.if(condition($c), temp1, temp2).run(); |
| 66 | }; |
| 67 | } |
| 68 | |
| 69 | export const bato: PageInterface = conditionalPageInterfaces( |
| 70 | ($c: ChibiGenerator<any>) => $c.querySelector('a.position-absolute > small').boolean().run(), |
no test coverage detected