apply type over codebase

This commit is contained in:
Jörg Breitbart
2019-06-17 23:31:54 +02:00
parent c5385a640d
commit 1dd63a6d66
10 changed files with 243 additions and 262 deletions
+25 -1
View File
@@ -493,7 +493,7 @@ declare module 'xterm' {
* The most recently-added handler is tried first.
* @return An IDisposable you can call to remove this handler.
*/
addCsiHandler(flag: string, callback: (params: number[], collect: string) => boolean): IDisposable;
addCsiHandler(flag: string, callback: (params: IParams, collect: string) => boolean): IDisposable;
/**
* (EXPERIMENTAL) Adds a handler for OSC escape sequences.
@@ -925,4 +925,28 @@ declare module 'xterm' {
*/
readonly width: number;
}
interface IParams {
/** from ctor */
maxLength: number;
maxSubParamsLength: number;
/** param values and its length */
params: Int16Array;
length: number;
/** sub params and its length */
subParams: Int16Array;
subParamsLength: number;
/** methods */
clone(): IParams;
toArray(): (number | number[])[];
reset(): void;
addParam(value: number): void;
addSubParam(value: number): void;
hasSubParams(idx: number): boolean;
getSubParams(idx: number): Int16Array | null;
getSubParamsAll(): {[idx: number]: Int16Array};
}
}