Merge remote-tracking branch 'ups/master' into pr/jerch/2393
This commit is contained in:
Vendored
+42
@@ -588,6 +588,12 @@ declare module 'xterm' {
|
||||
*/
|
||||
readonly parser: IParser;
|
||||
|
||||
/**
|
||||
* (EXPERIMENTAL) Get the Unicode handling interface
|
||||
* to register and switch Unicode version.
|
||||
*/
|
||||
readonly unicode: IUnicodeHandling;
|
||||
|
||||
/**
|
||||
* Natural language strings that can be localized.
|
||||
*/
|
||||
@@ -1317,4 +1323,40 @@ declare module 'xterm' {
|
||||
*/
|
||||
addOscHandler(ident: number, callback: (data: string) => boolean): IDisposable;
|
||||
}
|
||||
|
||||
/**
|
||||
* (EXPERIMENTAL) Unicode version provider.
|
||||
* Used to register custom Unicode versions with `Terminal.unicode.register`.
|
||||
*/
|
||||
export interface IUnicodeVersionProvider {
|
||||
/**
|
||||
* String indicating the Unicode version provided.
|
||||
*/
|
||||
readonly version: string;
|
||||
|
||||
/**
|
||||
* Unicode version dependent wcwidth implementation.
|
||||
*/
|
||||
wcwidth(codepoint: number): 0 | 1 | 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* (EXPERIMENTAL) Unicode handling interface.
|
||||
*/
|
||||
export interface IUnicodeHandling {
|
||||
/**
|
||||
* Register a custom Unicode version provider.
|
||||
*/
|
||||
register(provider: IUnicodeVersionProvider): void;
|
||||
|
||||
/**
|
||||
* Registered Unicode versions.
|
||||
*/
|
||||
readonly versions: ReadonlyArray<string>;
|
||||
|
||||
/**
|
||||
* Getter/setter for active Unicode version.
|
||||
*/
|
||||
activeVersion: string;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user