types/registry.types.ts

types/registry.types.ts is a file in Bane's Lab Site. 8 lines of code and 2 definitions.

export interface Identified {
    readonly id: string;
}

export interface Registry<T extends Identified> {
    readonly all: () => readonly T[];
    readonly byId: (id: string) => T | undefined;
    readonly register: (entry: T) => void;
}