Type alias MapStructureFunction<T>

MapStructureFunction<T>: ((contents, fullPath, stat) => Promise<string | Buffer> | string | Buffer)

Mapper function signature for [[mapStructure]] (async).

Type Parameters

  • T

Type declaration

    • (contents, fullPath, stat): Promise<string | Buffer> | string | Buffer
    • Parameters

      • contents: T

        returned value of [[readFile]]. Varies depending on readOptions

      • fullPath: string

        the full path to the file relative to the current working directory, NOT path

      • stat: Stats

      Returns Promise<string | Buffer> | string | Buffer

Returns

the value to pass to [[writeFile]], or a [[Promise]] resolving to the value to pass to [[writeFile]].

Generated using TypeDoc