pseudo-localization
Version:
pseudo-localization for internationalization testing
33 lines (32 loc) • 786 B
TypeScript
import { type PseudoLocalizeStringOptions } from './localize.ts';
type StartOptions = PseudoLocalizeStringOptions & {
/**
* Node tags to ignore in pseudo-localization.
*
* @default ['STYLE']
*/
blacklistedNodeNames?: string[];
/**
* The element to pseudo-localize text within.
*
* @default document.body
*/
root?: Node;
};
type StopFn = () => void;
/**
* A container for pseudo-localization of the DOM.
*
* @example
* new PseudoLocalizeDom().start();
*/
export declare class PseudoLocalizeDom {
#private;
/**
* Start pseudo-localizing the DOM.
*
* Returns a stop function to disable pseudo-localization.
*/
start({ strategy, blacklistedNodeNames, root, }?: StartOptions): StopFn;
}
export {};