@serenity-js/core
Version:
The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure
13 lines • 525 B
TypeScript
import type { Question } from './Question';
/**
* Describes the type of answer a given [`Answerable`](https://serenity-js.org/api/core/#Answerable) would
* resolve to when given to [`Actor.answer`](https://serenity-js.org/api/core/class/Actor/#answer).
*
* ```ts
* Answered<Answerable<T>> === T
* ```
*
* @group Questions
*/
export type Answered<T> = T extends null | undefined ? T : T extends Question<Promise<infer A>> | Question<infer A> | Promise<infer A> ? Awaited<A> : T;
//# sourceMappingURL=Answered.d.ts.map