import {type IWithIdentity} from "./interface"; export interface IResolveSource< TSource extends Record, TResult extends IWithIdentity = IWithIdentity, > { /** * Resolve ID based on request (for example duplication detection). * * This should return an ID or throw an exception. */ resolveId(source: TSource): Promise; } export namespace ResolveSource { export type Source = T extends IResolveSource ? U : T; export type Result = T extends IResolveSource ? U : T; }