UNPKG

@serenity-js/core

Version:

The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure

30 lines 1.7 kB
import type { EmitsDomainEvents } from '../../events'; import type { Outcome } from '../../model'; import type { PerformsActivities } from '../activities/PerformsActivities'; import type { Activity } from '../Activity'; import type { AnswersQuestions } from '../questions'; import { Ability } from './Ability'; import type { UsesAbilities } from './UsesAbilities'; /** * An [`Ability`](https://serenity-js.org/api/core/class/Ability/) that enables an [`Actor`](https://serenity-js.org/api/core/class/Actor/) to perform a given [`Activity`](https://serenity-js.org/api/core/class/Activity/). * * [`PerformActivities`](https://serenity-js.org/api/core/class/PerformActivities/) is used internally by [`Actor.attemptsTo`](https://serenity-js.org/api/core/class/Actor/#attemptsTo), and it is unlikely you'll ever need to use it directly in your code. * That is, unless you're building a custom Serenity/JS extension and want to override the default behaviour of the framework, * in which case you should check out the [Contributor's Guide](https://serenity-js.org/community/contributing). * * @group Abilities */ export declare class PerformActivities extends Ability { protected readonly actor: AnswersQuestions & UsesAbilities & PerformsActivities & { name: string; }; protected readonly stage: EmitsDomainEvents; constructor(actor: AnswersQuestions & UsesAbilities & PerformsActivities & { name: string; }, stage: EmitsDomainEvents); perform(activity: Activity): Promise<void>; protected outcomeFor(error: Error | any): Outcome; private detailsOf; protected nameOf(activity: Activity): string; } //# sourceMappingURL=PerformActivities.d.ts.map