Skip to main content

transpiler.api

API Report File for "jest-bdd-generator"

Do not edit this file. It is a report generated by API Extractor.


import * as ts from 'typescript';

// @public
export const customTransformerFactory: (searchSchema: ISearchCallSchema, self: Transpile) => ts.CustomTransformerFactory;

// @public
export type ExampleStep = {
key: 'Examples' | 'Scenario';
examples: Array<Record<string, string | number>>;
} & IStep;

// @public (undocumented)
export type IArgumentsSearchContext = {
host: string;
stepOfCurrentFunction: Step;
};

// @public (undocumented)
export type ICallbackOnFunctionExpression = (node: ts.Expression, callExpression: ts.CallExpression, context: IArgumentsSearchContext, ..._any: unknown[]) => void;

// @public (undocumented)
export type ISearchCallSchema = Array<ISearchExpressionSchema>;

// @public (undocumented)
export type ISearchExpressionSchema = {
keyword: string;
arguments: {
callback?: ICallbackOnFunctionExpression;
searchCallSchema?: ISearchCallSchema;
}[];
chain?: ISearchCallSchema;
};

// @public
export type IStep = {
stepParams?: string[];
key: IStepKey;
value: string;
examples?: Array<Record<string, string | number>>;
sanitizedTitle?: string;
pos: {
start: {
line: number;
character: number;
pos: number;
};
end: {
line: number;
character: number;
pos: number;
};
};
host?: string;
parent?: string;
sourceCode?: {
fullText: string;
imports?: string[];
exports?: string[];
statements?: ts.Statement[];
};
};

// @public
export type IStepKey = 'Given' | 'When' | 'Then' | 'Examples' | 'Scenario' | 'Feature';

// @public (undocumented)
export type Result = Step & {
status?: 'passed' | 'skipped' | 'failed';
errors?: string[];
};

// @public (undocumented)
export type Step = ExampleStep | IStep;

// @public (undocumented)
export class Transpile {
constructor(searchSchema?: ISearchCallSchema);
callbackOnFnArgument: ICallbackOnFunctionExpression;
callbackOnStringArgumentFactory: (name: IStepKey) => ICallbackOnFunctionExpression;
// @deprecated (undocumented)
dealwithSourceMap(input: string): Record<string, string>;
generateComments(): string;
generateFromKnownSteps(block: ts.Block): Transpile['output'];
getComments(block: ts.Block, _lastItem?: Step): Transpile['output'];
// (undocumented)
getDeclaration(declaration: ts.VariableDeclaration | ts.BindingElement): string[];
// (undocumented)
groupToScenario(): void;
set input(input: string);
get input(): string;
output: Step[];
// @deprecated (undocumented)
outputCode(): string;
parsePosition(pos: number): Step['pos']['start'];
possibleStep: Step[];
searchSchema: ISearchCallSchema;
source: string;
// (undocumented)
sourceFile?: ts.SourceFile;
get steps(): Step[];
transpile(input: string, options?: ts.TranspileOptions): ts.TranspileOutput;
// (undocumented)
get uniqueSteps(): Step[];
}

// (No @packageDocumentation comment for this package)