import type { Expression } from '@cucumber/cucumber-expressions'; import type { PickleStep } from '@cucumber/messages'; import type { ITestCaseHookParameter } from '../support_code_library_builder/types'; import type { GherkinStepKeyword } from './gherkin_step_keyword'; export interface IGetInvocationDataRequest { hookParameter: ITestCaseHookParameter; step: PickleStep; world: any; } export interface IGetInvocationDataResponse { getInvalidCodeLengthMessage: () => string; parameters: any[]; validCodeLengths: number[]; } export interface IDefinitionOptions { timeout?: number; wrapperOptions?: any; } export interface IHookDefinitionOptions extends IDefinitionOptions { name?: string; tags?: string; } export interface IDefinitionParameters { code: Function; id: string; line: number; options: T; order: number; unwrappedCode?: Function; uri: string; } export interface IStepDefinitionParameters extends IDefinitionParameters { keyword: GherkinStepKeyword; pattern: string | RegExp; expression: Expression; } export interface IDefinition { readonly code: Function; readonly id: string; readonly line: number; readonly options: IDefinitionOptions; readonly order: number; readonly unwrappedCode: Function; readonly uri: string; getInvocationParameters: (options: IGetInvocationDataRequest) => Promise; } export default abstract class Definition { readonly code: Function; readonly id: string; readonly line: number; readonly options: IDefinitionOptions; readonly order: number; readonly unwrappedCode: Function; readonly uri: string; constructor({ code, id, line, options, order, unwrappedCode, uri, }: IDefinitionParameters); buildInvalidCodeLengthMessage(syncOrPromiseLength: number | string, callbackLength: number | string): string; baseGetInvalidCodeLengthMessage(parameters: unknown[]): string; }