XuqmGroup-H5SDK/node_modules/@rushstack/terminal/lib-dts/AnsiEscape.d.ts
徐勤民 e34fa2052a feat(private): add private deployment SDK module
Adds @xuqm/h5-sdk/private entry point with JSON-based initialization,
feature gating, and error codes for private deployment scenarios.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 21:08:08 +08:00

35 行
1.3 KiB
TypeScript

/**
* Options for {@link AnsiEscape.formatForTests}.
* @public
*/
export interface IAnsiEscapeConvertForTestsOptions {
/**
* If true then `\n` will be replaced by `[n]`, and `\r` will be replaced by `[r]`.
*/
encodeNewlines?: boolean;
}
/**
* Operations for working with text strings that contain
* {@link https://en.wikipedia.org/wiki/ANSI_escape_code | ANSI escape codes}.
* The most commonly used escape codes set the foreground/background color for console output.
* @public
*/
export declare class AnsiEscape {
private static readonly _csiRegExp;
private static readonly _sgrRegExp;
private static readonly _backslashNRegExp;
private static readonly _backslashRRegExp;
static getEscapeSequenceForAnsiCode(code: number): string;
/**
* Returns the input text with all ANSI escape codes removed. For example, this is useful when saving
* colorized console output to a log file.
*/
static removeCodes(text: string): string;
/**
* Replaces ANSI escape codes with human-readable tokens. This is useful for unit tests
* that compare text strings in test assertions or snapshot files.
*/
static formatForTests(text: string, options?: IAnsiEscapeConvertForTestsOptions): string;
private static _tryGetSgrFriendlyName;
}
//# sourceMappingURL=AnsiEscape.d.ts.map