UNPKG

dynamodb-toolbox

Version:

Lightweight and type-safe query builder for DynamoDB and TypeScript.

20 lines (19 loc) 405 B
import type { Key } from './key.js'; export interface LocalIndex { type: 'local'; partitionKey?: undefined; sortKey: Key; } export interface GlobalIndex { type: 'global'; partitionKey: Key; sortKey?: Key; } /** * Define an index of a Table * * @param KEY_NAME Key attribute name * @param KEY_TYPE Key value type * @return Key */ export type Index = LocalIndex | GlobalIndex;