( raw: string | undefined, projectDir: string, stat: (path: string) => Stats, )
| 207 | * process with a friendly error box on validation failure. |
| 208 | */ |
| 209 | export function resolveCompositionEntryArg( |
| 210 | raw: string | undefined, |
| 211 | projectDir: string, |
| 212 | stat: (path: string) => Stats, |
| 213 | ): string | undefined { |
| 214 | const result = parseCompositionEntryArg(raw, projectDir, stat); |
| 215 | if (!result.ok) { |
| 216 | const { title, message, hint } = compositionEntryErrorMessage(result.error); |
| 217 | errorBox(title, message, hint); |
| 218 | process.exit(1); |
| 219 | } |
| 220 | return result.value; |
| 221 | } |
| 222 | |
| 223 | export type GifLoopParseResult = |
| 224 | | { ok: true; value: number | undefined } |
no test coverage detected