UNPKG

@spindl-xyz/attribution-lite

Version:
15 lines (14 loc) 572 B
export type Primitive = undefined | string | number | boolean | bigint; type Values = Primitive | Primitive[]; export type Tuple<Value extends Values = Values> = { [key: string]: Value; }; export interface MetadataFactory<Value extends Values> { getValue(): Tuple<Value> | Promise<Tuple<Value>>; } export type MetadataPlugin<Value extends Values = Values> = () => MetadataFactory<Value>; export interface Metadata { getMetadata(): Promise<Record<string, Values>>; } export declare function createMetadataPlugin(plugins: MetadataPlugin[]): Metadata; export {};