aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-devtools/heap/v8.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/bun-devtools/heap/v8.d.ts')
-rw-r--r--packages/bun-devtools/heap/v8.d.ts30
1 files changed, 30 insertions, 0 deletions
diff --git a/packages/bun-devtools/heap/v8.d.ts b/packages/bun-devtools/heap/v8.d.ts
new file mode 100644
index 000000000..ce57965c0
--- /dev/null
+++ b/packages/bun-devtools/heap/v8.d.ts
@@ -0,0 +1,30 @@
+export namespace V8 {
+ /**
+ * @link https://github.com/julianburr/chrome-heap-snapshot-parser/blob/master/index.js#L72
+ * @link https://stackoverflow.com/questions/69802133/chrome-heap-snapshot-structure-explanation
+ */
+ export type HeapSnapshot = {
+ snapshot: {
+ meta: {
+ node_fields: string[];
+ node_types: [string[], ...string[]]; // ?
+ edge_fields: string[];
+ edge_types: [string[], ...string[]]; // ?
+ trace_function_info_fields: string[];
+ trace_node_fields: string[];
+ sample_fields: string[];
+ location_fields: string[];
+ node_count: number;
+ edge_count: number;
+ trace_function_count: number;
+ };
+ };
+ nodes: number[];
+ edges: number[];
+ trace_tree: unknown[];
+ trace_function_infos: unknown[];
+ samples: unknown[];
+ locations: number[];
+ strings: string[];
+ };
+}