UNPKG

@oaklean/profiler-core

Version:

Part of the @oaklean suite. It provides all basic functions to work with the `.oak` file format. It allows parsing the `.oak` file format as well as tools for analyzing the measurement values. It also provides all necessary capabilities required for prec

31 lines (30 loc) 1.29 kB
import { BaseModel } from './BaseModel'; export type ModelSetValueType = string | number | BaseModel; export declare enum ModelSetValueTypeEnum { string = 0, number = 1, object = 2 } export declare class ModelSet<TVALUE extends ModelSetValueType> extends BaseModel { private _set; constructor(); get size(): number; add(value: TVALUE): void; delete(value: TVALUE): void; clear(): void; has(value: TVALUE): boolean; entries(): IterableIterator<TVALUE>; get [Symbol.toStringTag](): string; [Symbol.iterator](): IterableIterator<[TVALUE, TVALUE]>; forEach(callback: (value: TVALUE, value2: TVALUE, set: Set<TVALUE>) => void, thisArg?: any): void; toJSON<T>(): T[] | undefined; static fromJSON<TVALUE extends ModelSetValueType>(json: string | object, fromJSON: TVALUE extends BaseModel ? (json: string | any, ...args: any[]) => TVALUE : 'string' | 'number'): ModelSet<TVALUE>; toBuffer(): Buffer; static consumeFromBuffer<TVALUE extends ModelSetValueType>(buffer: Buffer, fromBuffer: TVALUE extends BaseModel ? (buffer: Buffer, ...args: any[]) => { instance: TVALUE; remainingBuffer: Buffer; } : 'string' | 'number'): { instance: ModelSet<TVALUE>; remainingBuffer: Buffer; }; }