Skip to content

Commit 72882a3

Browse files
style: fix code style
1 parent f14598d commit 72882a3

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/codegen/generateRouteFileInfoMap.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,21 +64,28 @@ function generateRouteFileInfoLines(
6464
routeNames: string[]
6565
childrenNamedViews: string[] | null
6666
}> {
67-
const deepChildren = node.children.size > 0
68-
? node.getChildrenDeepSorted()
69-
: null
67+
const deepChildren =
68+
node.children.size > 0 ? node.getChildrenDeepSorted() : null
7069

7170
const deepChildrenNamedViews = deepChildren
7271
? Array.from(
7372
new Set(
74-
deepChildren.flatMap((child) => Array.from(child.value.components.keys()))
73+
deepChildren.flatMap((child) =>
74+
Array.from(child.value.components.keys())
75+
)
7576
)
7677
)
7778
: null
7879

79-
const routeNames: Array<Extract<TreeNode['name'], string>> = [node, ...(deepChildren ?? [])]
80+
const routeNames: Array<Extract<TreeNode['name'], string>> = [
81+
node,
82+
...(deepChildren ?? []),
83+
]
8084
// unnamed routes and routes that don't correspond to certain components cannot be accessed in types
81-
.filter((node): node is TreeNode & { name: string } => node.value.components.size > 0 && !!node.name)
85+
.filter(
86+
(node): node is TreeNode & { name: string } =>
87+
node.value.components.size > 0 && !!node.name
88+
)
8289
.map((node) => node.name)
8390

8491
// Most of the time we only have one view, but with named views we can have multiple.

0 commit comments

Comments
 (0)