UNPKG

@eclipse-scout/core

Version:
22 lines 1.23 kB
import { DoEntity } from '..'; export declare const dataObjects: { /** * @returns the DO entity contribution for the given contribution class or type. */ getContribution<TContributionDo extends DoEntity>(contributionClassOrType: DoContributionClassOrType<TContributionDo>, doEntity: DoEntityWithContributions): TContributionDo; /** * Adds a new DO entity contribution to the given DO entity. * Existing contributions for the same contribution class are replaced. If the contribution is a plain object, existing contributions with the same type are replaced. */ addContribution(contribution: DoEntity, doEntity: DoEntityWithContributions): void; /** * Removes the DO entity contributions whose class or type matches the given contribution class. */ removeContribution<TContributionDo_1 extends DoEntity>(contributionClassOrType: DoContributionClassOrType<TContributionDo_1>, doEntity: DoEntityWithContributions): void; }; type DoEntityWithContributions = DoEntity & { _contributions?: DoEntity[]; }; type DoContributionClassOrType<TContributionDo extends DoEntity> = string | (new (...args: any[]) => TContributionDo); export {}; //# sourceMappingURL=dataObjects.d.ts.map