import { CallLineToFileOptions } from "./test.unit.types"; declare const __CALL_LINE__ = "__callLine__"; type CallLineWindowType = Window & { [__CALL_LINE__]?: CallLine; }; /** * Disable the call line in the window object * * @param childWindow A window instance. In Cypress, it must be the window of `cy.window()` */ export declare const disableCallLine: (childWindow?: CallLineWindowType) => void; /** * Enable the call line in the window object and create a new instance of the CallLine class * * @param childWindow A window instance. In Cypress, it must be the window of `cy.window()` * @example How to enable in Cypress * ```ts * ·beforeEach(() => { * · cy.window().then((win) => { * · enableCallLine(win); * · }); * ·}); * ``` */ export declare const enableCallLine: (childWindow?: CallLineWindowType) => void; /** * Check if the call line is enabled * * @returns True if the call line is enabled */ export declare const isCallLineEnabled: (win?: CallLineWindowType) => boolean; /** * Get a created instance of the CallLine class. It is not intended to be used, * use `cy.callLine` instead. * * @returns An instance of the CallLine class */ export declare const getCallLine: () => CallLine; /** * It is a helper class for the call line that is stored in the window object. */ export declare class CallLine { private _stack; private i; /** * Get the stack of the call line */ get array(): { args: any[]; date: Date; }[]; /** * The last existing entry. It can be `undefined` if there is no entry at * the moment or if `next` has not been called. Otherwise, it always returns * the last entry invoked by `next`. */ get current(): unknown | unknown[] | undefined; /** * True if CallLine feature is globally enabled */ get isEnabled(): boolean; /** * Get the number of all entries. */ get length(): number; get name(): string; /** * Get the next entry. If there is no next entry, it returns `undefined`. * * If the entry was added as a single argument like `lineCalled("something")`, * it will return the single value "something". But if it was added as multiple * arguments like `lineCalled("something", 1, true)`, it will return an array * `["something", 1, true]`. */ get next(): unknown | unknown[] | undefined; /** * Add a new entry to the call line * * @param args The arguments to store */ call(args: any | any[]): void; /** * Clean the CallLine array and start storing the values from the beginning */ clean(): void; /** * Resets the counter and starts from the first entry on the next call to `next` */ reset(): void; /** * Save CallLine entries to a file. Arguments passed to `lineCalled` are stored as arrays. * * @param outputDir The folder to save the call line * @param options The options for the file */ toFile(outputDir: string, options?: CallLineToFileOptions & Partial): Cypress.Chainable; } export {};