Skip to content
On this page

This is an auto-generated document to support extension builders understand the internal packages they can utilize. To find our written guides, tutorials, and API/SDK reference, check out our main docs .

Directus / @directus/sdk / types / MapFlatFields

Type alias: MapFlatFields<Item, Fields, FunctionMap>

MapFlatFields<Item, Fields, FunctionMap>: { [F in Fields as F extends keyof FunctionMap ? FunctionMap[F] : F]: F extends keyof FunctionMap ? FunctionOutputType : Extract<Item[F], keyof FieldOutputMap> extends infer A ? A[] extends never[] ? Item[F] : A extends keyof FieldOutputMap ? FieldOutputMap[A] | Exclude<Item[F], A> : Item[F] : Item[F] }

Map literal types to actual output types

Type parameters

Item extends object

Fields extends keyof Item

FunctionMap extends Record<string, string>