(work: () => Promise<T>)
| 58 | } |
| 59 | |
| 60 | async function time<T>(work: () => Promise<T>): Promise<[T, number]> { |
| 61 | let start = +new Date(); |
| 62 | let result = await work(); |
| 63 | let end = +new Date(); |
| 64 | return [result, end - start]; |
| 65 | } |
| 66 | |
| 67 | export async function quicktype(opts: Partial<CLIOptions>) { |
| 68 | let [result, duration] = await time(async () => { |
no outgoing calls
no test coverage detected
searching dependent graphs…