export type StepFn = (this: TContext) => void | Promise; export type StepArray = Array>; export type StepObject = { [name: string]: StepFn; }; export type Step = StepObject | StepArray; export type ThenStepWithExpectError = { expect_error: (this: TContext, error: Error) => void | Promise; and?: Step; }; export type ThenStep = | ThenStepWithExpectError | Omit, "and" | "expect_error"> | StepArray;