Fix TypeScript compilation issues in packages
- Add explicit type annotations for isolatedDeclarations - Export Database type alias from db-schema - Fix import paths and add proper type exports - Update common schemas with better exports Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
* @module @reviq/db
|
||||
*/
|
||||
|
||||
import { Kysely, PostgresDialect } from "kysely";
|
||||
import type { Database } from "@reviq/db-schema";
|
||||
import { Kysely, PostgresDialect } from "kysely";
|
||||
import pg from "pg";
|
||||
|
||||
const { Pool } = pg;
|
||||
@@ -17,11 +17,11 @@ const { Pool } = pg;
|
||||
* @returns Kysely database instance
|
||||
*/
|
||||
export const createDb = (
|
||||
connectionString: string = process.env.DATABASE_URL || ""
|
||||
connectionString: string = process.env.DATABASE_URL || "",
|
||||
): Kysely<Database> => {
|
||||
if (!connectionString) {
|
||||
throw new Error(
|
||||
"Database connection string is required. Set DATABASE_URL environment variable."
|
||||
"Database connection string is required. Set DATABASE_URL environment variable.",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user