dynamodb-toolbox
Version:
Lightweight and type-safe query builder for DynamoDB and TypeScript.
13 lines (12 loc) • 703 B
TypeScript
import type { EntityErrorBlueprints } from '../entity/errors.js';
import type { OptionsErrorBlueprints } from '../options/errors.js';
import type { SchemaErrorBlueprints } from '../schema/errors.js';
import type { TableErrorBlueprints } from '../table/errors.js';
import type { ErrorBlueprint } from './blueprint.js';
type ErrorBlueprints = SchemaErrorBlueprints | EntityErrorBlueprints | TableErrorBlueprints | OptionsErrorBlueprints;
type IndexErrors<ERROR_BLUEPRINTS extends ErrorBlueprint> = {
[ERROR_BLUEPRINT in ERROR_BLUEPRINTS as ERROR_BLUEPRINT['code']]: ERROR_BLUEPRINT;
};
export type IndexedErrors = IndexErrors<ErrorBlueprints>;
export type ErrorCodes = keyof IndexedErrors;
export {};