(throwOnError?: boolean)
| 26 | const duplicates = <T>(xs: T[]) => xs.filter((x, i) => xs.indexOf(x) !== i); |
| 27 | |
| 28 | const createValidator = (throwOnError?: boolean) => (fn: () => void) => { |
| 29 | try { |
| 30 | fn(); |
| 31 | } catch (error) { |
| 32 | if (throwOnError) { |
| 33 | throw error; |
| 34 | } else { |
| 35 | console.error((error as Error).message); |
| 36 | } |
| 37 | } |
| 38 | }; |
| 39 | |
| 40 | interface Meta extends BlockStructure { |
| 41 | order: number; |
no outgoing calls
no test coverage detected