UNPKG

500 BTypeScriptView Raw
1/**
2 * `id` property declaration.
3 */
4export interface IID<T> {
5 readonly id: T;
6}
7/**
8 * Common minimal base interface for ID generators.
9 */
10export interface IIDGen<T> {
11 /**
12 * Returns next available ID (or throws an error if none available).
13 */
14 next(): T;
15 /**
16 * Releases given ID (to be called when ID isn't needed anymore). Actual
17 * behavior is implementation specific.
18 *
19 * @param id
20 */
21 free(id: T): boolean;
22}
23//# sourceMappingURL=id.d.ts.map
\No newline at end of file