import { AbilityType, Actor } from './actor'; /** * Type definition for question interactions. */ export interface QuestionInteraction
{ invoke(param: P, assert: (answer: R) => void): void; } /** * Type definition for questions. * * An question is a list of interactions that accept a parameter of type P and * and accept an assertion callback of type R. */ type QuestionType
= { new (actor: Actor): QuestionInteraction
; }; export type Question
= QuestionType
| QuestionType
[]; export type QuestionProcedure = (ability: AbilityType, param: P, assert: (answer: R) => void) => void; /** * Shorthand for creating questions using a specific ability. * * @param ability * A constructor for an ability service. * @param procedure * The procedure to answer this question. */ export declare function createQuestion(ability: { new (): A; }, procedure: QuestionProcedure): { new (actor: Actor): { /** * A ability service object to invoke commands on. */ ability?: A | undefined; /** * An actor to perform sub-tasks. */ actor?: Actor | undefined; invoke(param: P, assert: (answer: R) => void): void; }; }; export {};