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

43 lines (42 loc) 2.49 kB
/// <reference types="node" /> import { SourceNodeIndex } from './SourceNodeIndex'; import { GlobalIndex } from './GlobalIndex'; import { ModuleIndex } from './ModuleIndex'; import { BaseModel } from '../BaseModel'; import { ModelMap } from '../ModelMap'; import { SourceNodeIdentifier_string } from '../../types/SourceNodeIdentifiers'; import { PathID_number, IPathIndex, UnifiedPath_string, IndexRequestType, SourceNodeID_number, SourceNodeIndexType, LangInternalPath_string, LangInternalSourceNodeIdentifier_string } from '../../types'; export declare class PathIndex extends BaseModel { moduleIndex: ModuleIndex; identifier: UnifiedPath_string | LangInternalPath_string; sourceNodeMap: ModelMap<SourceNodeIdentifier_string | LangInternalSourceNodeIdentifier_string, SourceNodeIndex<SourceNodeIndexType.SourceNode>>; reverseSourceNodeMap: ModelMap<SourceNodeID_number, SourceNodeIndex<SourceNodeIndexType.SourceNode>>; private _id?; children?: ModelMap<string, PathIndex>; file?: ModelMap<string, SourceNodeIndex<SourceNodeIndexType>>; constructor(identifier: UnifiedPath_string | LangInternalPath_string, moduleIndex: ModuleIndex, id?: PathID_number); private _containsUncommittedChanges?; get containsUncommittedChanges(): boolean; set containsUncommittedChanges(v: boolean); insertToOtherIndex(globalIndex: GlobalIndex): PathIndex; toBuffer(): Buffer; sourceNodeIDs(): SourceNodeID_number[]; addToSourceNodeMap(sourceNodeIndex: SourceNodeIndex<SourceNodeIndexType.SourceNode>): void; set id(id: PathID_number | undefined); get id(): PathID_number | undefined; get pathId(): PathID_number | undefined; selfAssignId(): void; toJSON(): { cucc: boolean; id: PathID_number | undefined; children: Record<string | number, unknown> | undefined; file: Record<string | number, unknown> | undefined; } | { cucc?: undefined; id: PathID_number | undefined; children: Record<string | number, unknown> | undefined; file: Record<string | number, unknown> | undefined; }; static fromJSON(json: string | IPathIndex, pathParts: string[], moduleIndex: ModuleIndex): PathIndex; getSourceNodeIndex<T extends IndexRequestType, R = T extends 'upsert' ? SourceNodeIndex<SourceNodeIndexType.SourceNode> : (SourceNodeIndex<SourceNodeIndexType.SourceNode> | undefined)>(indexRequestType: T, sourceNodeIdentifier: SourceNodeIdentifier_string): R; }