Skip to content

Commit 3598b66

Browse files
committed
format
1 parent 6f9c15b commit 3598b66

2 files changed

Lines changed: 19 additions & 22 deletions

File tree

src/components/PointerTreeItem.vue

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -127,20 +127,22 @@ function getChildren(
127127
const value = extractValue(difValueContainer);
128128
129129
if (Array.isArray(value)) {
130-
// @ts-expect-error --- fixme
131-
return (value as DIF.Definitions.DIFMapTypeDefinition).map(([keyContainer, valueContainer]) => {
132130
// @ts-expect-error --- fixme
133-
const keyValue = extractValue(keyContainer);
134-
const keyDisplay =
135-
typeof keyValue === 'string'
136-
? keyValue
137-
: typeof keyValue === 'number'
138-
? String(keyValue)
139-
: typeof keyValue === 'boolean'
140-
? String(keyValue)
141-
: JSON.stringify(keyValue);
142-
return [keyDisplay, valueContainer, keyContainer];
143-
});
131+
return (value as DIF.Definitions.DIFMapTypeDefinition).map(
132+
([keyContainer, valueContainer]) => {
133+
// @ts-expect-error --- fixme
134+
const keyValue = extractValue(keyContainer);
135+
const keyDisplay =
136+
typeof keyValue === 'string'
137+
? keyValue
138+
: typeof keyValue === 'number'
139+
? String(keyValue)
140+
: typeof keyValue === 'boolean'
141+
? String(keyValue)
142+
: JSON.stringify(keyValue);
143+
return [keyDisplay, valueContainer, keyContainer];
144+
},
145+
);
144146
}
145147
146148
if (typeof value === 'object' && value !== null) {
@@ -165,11 +167,7 @@ function getChildren(
165167
if (Array.isArray(value)) {
166168
// @ts-expect-error --- fixme
167169
return (value as DIF.Definitions.DIFListTypeDefinition).map(
168-
(item: DIF.Definitions.DIFType, index: number) => [
169-
String(index),
170-
item,
171-
undefined,
172-
],
170+
(item: DIF.Definitions.DIFType, index: number) => [String(index), item, undefined],
173171
);
174172
}
175173

src/composable/NetworkTrace/traceToNodeTree.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
import type { NodeTree, Node, Edge } from '@/types/NodeTree/node-tree.ts';
22
import type { Builtins } from '@unyt/datex';
33

4-
54
interface TraceHop {
65
endpoint: Builtins.Endpoint;
76
distance: number;
87
socket: {
98
interface_type: string;
10-
interface_name: string|null;
9+
interface_name: string | null;
1110
channel: string;
1211
socket_uuid: string;
1312
};
14-
direction: Builtins.Tagged<"Incoming"> | Builtins.Tagged<"Outgoing">;
13+
direction: Builtins.Tagged<'Incoming'> | Builtins.Tagged<'Outgoing'>;
1514
fork_nr: string;
1615
bounce_back: boolean;
1716
}
@@ -20,7 +19,7 @@ interface TraceResult {
2019
sender: Builtins.Endpoint;
2120
receiver: Builtins.Endpoint;
2221
hops: TraceHop[];
23-
round_trip_time: unknown|number;
22+
round_trip_time: unknown | number;
2423
}
2524

2625
function generateId(): string {

0 commit comments

Comments
 (0)