(name: string, run: RuleRunner<PiralRuleContext>)
| 101 | } |
| 102 | |
| 103 | export function withPiralRule(name: string, run: RuleRunner<PiralRuleContext>) { |
| 104 | if (typeof name !== 'string') { |
| 105 | log('apiValidateNameInvalid_0202', 'Piral'); |
| 106 | } else if (typeof run !== 'function') { |
| 107 | log('apiValidateRunInvalid_0203', 'Piral'); |
| 108 | } else { |
| 109 | addPiralRule({ name, run }); |
| 110 | } |
| 111 | |
| 112 | return this; |
| 113 | } |
| 114 | |
| 115 | export function withPiletRule(name: string, run: RuleRunner<PiletRuleContext>) { |
| 116 | if (typeof name !== 'string') { |
nothing calls this directly
no test coverage detected