Libraries
    Preparing search index...

    Type Alias Middleware

    Middleware: (next: FetchLike) => FetchLike

    A middleware is a function that accepts the next handler in the chain and returns a new handler that wraps it.

    Type Declaration

    const timing: Middleware = (next) => async (url, init) => {
    const start = performance.now();
    const res = await next(url, init);
    console.log(`${url} took ${performance.now() - start}ms`);
    return res;
    };