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

28 lines (27 loc) 1.49 kB
/// <reference types="node" /> import { PathIndex } from './PathIndex'; import { GlobalIndex } from './GlobalIndex'; import { BaseModel } from '../BaseModel'; import { ModelMap } from '../ModelMap'; import { NodeModule } from '../NodeModule'; import { PathID_number, IndexRequestType, UnifiedPath_string, LangInternalPath_string, NodeModuleIdentifier_string, ModuleID_number, IModuleIndex } from '../../types'; export declare class ModuleIndex extends BaseModel { globalIndex: GlobalIndex; identifier: NodeModuleIdentifier_string; pathMap: ModelMap<UnifiedPath_string | LangInternalPath_string, PathIndex>; reversePathMap: ModelMap<PathID_number, PathIndex>; private _id; children: ModelMap<string, PathIndex>; constructor(identifier: NodeModuleIdentifier_string, globalIndex: GlobalIndex, id?: ModuleID_number); insertToOtherIndex(globalIndex: GlobalIndex): ModuleIndex; addToPathMap(pathIndex: PathIndex): void; get id(): ModuleID_number; toBuffer(): Buffer; toJSON(): { id: ModuleID_number; children: Record<string | number, unknown> | undefined; }; static fromJSON(json: string | IModuleIndex, identifier: NodeModuleIdentifier_string, globalIndex: GlobalIndex): ModuleIndex; getFilePathIndex<T extends IndexRequestType, R = T extends 'upsert' ? PathIndex : (PathIndex | undefined)>(indexRequestType: T, filePath: UnifiedPath_string | LangInternalPath_string): R; nodeModule(): NodeModule | undefined; }