Commit 1054068
committed
fix(drizzle): add missing closing parenthesis in D1 getDb function
When generating the database client file for Cloudflare D1, the template
string was missing a closing parenthesis in the arrow function parameter,
resulting in invalid TypeScript syntax.
This caused the parser to fail with 'Unexpected token' error during project
creation when using the drizzle addon with D1 database option.
Changed:
export const getDb = (d1: D1Database => drizzle(d1, { schema });
To:
export const getDb = (d1: D1Database) => drizzle(d1, { schema });
Fixes the error: Unable to process 'src/lib/server/db/index.ts'. Reason: Unexpected token1 parent 490859d commit 1054068
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| |||
0 commit comments