(build: () => result)
| 164 | } |
| 165 | |
| 166 | const run = <result>(build: () => result): result => { |
| 167 | try { |
| 168 | return build() |
| 169 | } catch (e) { |
| 170 | // e.g. a config module that can't be read or a tsconfig that's missing, |
| 171 | // which the message names |
| 172 | if (!isBuildError(e)) throw e |
| 173 | if (isCheckJson) emitJsonFailure(e.message, 1) |
| 174 | console.error(e.message) |
| 175 | process.exit(1) |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | const declare = (): never => { |
| 180 | const checker = values.checker as string | undefined |
no test coverage detected