Skip to content
On this page

Directus Cloud

Everything you need to start building. Provisioned in 90 seconds. Starting at $15/month.

Get Started

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>

Defined in ​

types/output.ts:100