Type alias MtimeCachedMethod<R>

MtimeCachedMethod<R>: {
    cache: MapLike<string, R>;
    getMtime: ((path) => number | undefined);
    mtimeCache: MapLike<string, [mtime: number, lastStatTime: number]>;
    (path): R;
}

Type Parameters

  • R

Type declaration

    • (path): R
    • Return type of cachedMtime()

      Parameters

      • path: string

      Returns R

  • cache: MapLike<string, R>

    return value cache

  • getMtime: ((path) => number | undefined)
      • (path): number | undefined
      • Get the numeric mtime value for a given path, if possible. Will statSync() the file if the mtime is not in the cache, or if the time since the lastStatTime is greater than the statFreqMs provided to cachedMtime.

        Parameters

        • path: string

        Returns number | undefined

  • mtimeCache: MapLike<string, [mtime: number, lastStatTime: number]>

    cache of mtime values and the most recent peformance.now() value when the statSync was performed to read it.

Generated using TypeDoc