-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrootCompatibility.ts
More file actions
50 lines (41 loc) · 1.57 KB
/
Copy pathrootCompatibility.ts
File metadata and controls
50 lines (41 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import createBoundedMemoryCapabilityReport
from './src/domain/memory/createBoundedMemoryCapabilityReport.ts';
import type { PropValue } from './src/domain/types/PropValue.ts';
export function createNodeAdd(node: string): { type: 'NodeAdd'; node: string } {
return { type: 'NodeAdd' as const, node };
}
export function createNodeTombstone(node: string): { type: 'NodeTombstone'; node: string } {
return { type: 'NodeTombstone' as const, node };
}
export function createEdgeAdd(
from: string,
to: string,
label: string,
): { type: 'EdgeAdd'; from: string; to: string; label: string } {
return { type: 'EdgeAdd' as const, from, to, label };
}
export function createEdgeTombstone(
from: string,
to: string,
label: string,
): { type: 'EdgeTombstone'; from: string; to: string; label: string } {
return { type: 'EdgeTombstone' as const, from, to, label };
}
type PropSetValue = { type: 'inline'; value: PropValue } | { type: 'blob'; oid: string };
export function createPropSet(
node: string,
key: string,
value: PropSetValue,
): { type: 'PropSet'; node: string; key: string; value: PropSetValue } {
return { type: 'PropSet' as const, node, key, value };
}
export function createInlineValue(value: PropValue): { type: 'inline'; value: PropValue } {
return { type: 'inline' as const, value };
}
export function createBlobValue(oid: string): { type: 'blob'; oid: string } {
return { type: 'blob' as const, oid };
}
/**
* @deprecated Use createBoundedMemoryCapabilityReport.
*/
export const createV18BoundedMemoryCapabilityReport = createBoundedMemoryCapabilityReport;