Skip to content

Commit 93e9de5

Browse files
authored
fix: avoid unused variable error in template when lakebase is disabled (#165)
When lakebase plugin is not enabled, the `.then(async (appkit) => {})` block was empty, causing TS6133 "declared but never read" typecheck failure. Conditionally emit the `.then()` block only when lakebase is enabled. Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
1 parent bf54836 commit 93e9de5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

template/server/server.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ createApp({
1818
{{- end}}
1919
{{- end}}
2020
],
21-
}).then(async (appkit) => {
21+
})
2222
{{- if .plugins.lakebase}}
23-
await setupSampleLakebaseRoutes(appkit);
24-
await appkit.server.start();
23+
.then(async (appkit) => {
24+
await setupSampleLakebaseRoutes(appkit);
25+
await appkit.server.start();
26+
})
2527
{{- end}}
26-
}).catch(console.error);
28+
.catch(console.error);

0 commit comments

Comments
 (0)