Files
NapCatQQ/.pnpm-store/v3/files/1b/053be3f69570bd3a9283af25b4b4c080deb2731d3b715b4ff1cc8ae2a8e9f2f8d7e197dc6b6cd85ae48e2faefecd209a7143fe71ea440caae4907519916436
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

22 lines
1.1 KiB
Plaintext

import { Cloneable } from './Cloneable';
export type OneToManyMapStartSpec<TRelation extends object> = {
[TKey in keyof TRelation]: {
isOptional: undefined extends TRelation[TKey] ? true : false;
};
};
/**
* Data structure able to efficiently manage a set of models related to a set of properties in a one to many relation.
*/
export declare class OneToManyMapStar<TModel, TRelation extends object> implements Cloneable<OneToManyMapStar<TModel, TRelation>> {
#private;
constructor(spec: OneToManyMapStartSpec<TRelation>);
add(model: TModel, relation: TRelation): void;
clone(): this;
get<TKey extends keyof TRelation>(key: TKey, value: Required<TRelation>[TKey]): Iterable<TModel> | undefined;
getAllKeys<TKey extends keyof TRelation>(key: TKey): Iterable<TRelation[TKey]>;
removeByRelation<TKey extends keyof TRelation>(key: TKey, value: Required<TRelation>[TKey]): void;
protected _buildNewInstance(spec: OneToManyMapStartSpec<TRelation>): this;
protected _cloneModel(model: TModel): TModel;
protected _cloneRelation(relation: TRelation): TRelation;
}
//# sourceMappingURL=OneToManyMapStar.d.ts.map