Skip to content

Commit 550b435

Browse files
chore: improve jsdoc
1 parent 1d96c16 commit 550b435

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

create-db/src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export type {
2828
RegionId,
2929
CreateDatabaseResult,
3030
DatabaseResult,
31+
DatabaseError,
3132
ProgrammaticCreateOptions,
3233
} from "./types.js";
3334

@@ -595,6 +596,11 @@ const caller = createRouterClient(router, { context: {} });
595596
/**
596597
* Create a new Prisma Postgres database programmatically.
597598
*
599+
* @param options - Options for creating the database
600+
* @param options.region - The AWS region for the database (optional)
601+
* @param options.userAgent - Custom user agent string (optional)
602+
* @returns A promise that resolves to either a {@link DatabaseResult} or {@link DatabaseError}
603+
*
598604
* @example
599605
* ```typescript
600606
* import { create } from "create-db";
@@ -604,6 +610,8 @@ const caller = createRouterClient(router, { context: {} });
604610
* if (result.success) {
605611
* console.log(`Connection string: ${result.connectionString}`);
606612
* console.log(`Claim URL: ${result.claimUrl}`);
613+
* } else {
614+
* console.error(`Error: ${result.message}`);
607615
* }
608616
* ```
609617
*/

0 commit comments

Comments
 (0)