import type { Decorator } from '../types/main.js'; /** * Collection of decorators to apply on an instance of playwright page, * context, or the response objects. * * Since, Playwright does not offer any extensible APIs, we have to apply * decorators on every instance. * * @example * ```ts * // Register a custom decorator * decoratorsCollection.register({ * page(page) { * page.customMethod = function() { * // Custom implementation * } * } * }) * ``` */ declare class DecoratorsCollection { #private; /** * Register a custom decorator to extend page, context, or response objects * * @param decorator - The decorator to register */ register(decorator: Decorator): this; /** * Returns the list of all registered decorators */ toList(): Decorator[]; } /** * Singleton instance of the decorators collection */ declare const decoratorsCollection: DecoratorsCollection; export { decoratorsCollection };