diff --git a/src/lib/index.ts b/src/lib/index.ts index c2c405a..84ebbc6 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -1,7 +1,6 @@ // place files you want to import through the `$lib` alias in this folder. import path from 'path'; import bunyan from 'bunyan'; -import type { MaybePromise } from '@sveltejs/kit'; export const log = bunyan.createLogger({ name: 'fotochallenge', @@ -33,6 +32,8 @@ export const requestIdHeader = 'x-request-id'; export default safePath; +export type MaybePromise = T | Promise; + export async function timedExecution( fn: () => MaybePromise ): Promise<{ executionTime: number; result: T }> {