Type Alias ItemMap<M, HashKey, RangeKey>

ItemMap<M, HashKey, RangeKey>: {
    [EntityToken in keyof Exactify<M>]: Unwrap<{
        [P in keyof Exactify<M[EntityToken]>]: [NonNullable<M[EntityToken][P]>] extends [never]
            ? string
            : M[EntityToken][P]
    } & {
        [P in HashKey | RangeKey]?: string
    }>
}

Extracts a map of Entity item types decorated with hashKey, rangeKey, and generated properties.

Type Parameters

  • M extends EntityMap

    The EntityMap type that identitfies the Entity & related property types to be managed by EntityManager.

  • HashKey extends string = "hashKey"

    The property used across the configuration to store an Entity's sharded hash key. Should be configured as the table hash key. Must not conflict with any Entity property. Defaults to 'hashKey'.

  • RangeKey extends string = "rangeKey"

    The property used across the configuration to store an Entity's range key. Should be configured as the table range key. Must not conflict with any Entity property. Defaults to 'rangeKey'.