interfaces, add test for clone

This commit is contained in:
Jörg Breitbart
2019-06-17 21:17:56 +02:00
parent 24c39f664d
commit cec1aa3f33
3 changed files with 39 additions and 30 deletions
+1 -30
View File
@@ -2,36 +2,7 @@
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*/
// TODO: move to Types
interface IParamsConstructor {
new(maxLength: number, maxSubParamsLength: number): IParams;
fromArray(values: (number | number[])[]): IParams;
}
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};
}
import { IParams } from 'common/parser/Types';
/**
* Params storage class.