Skip to content

Commit 45d8232

Browse files
authored
Merge pull request #10 from NoNameProvided/patch-1
Add support for Typescript typings thanks @NoNameProvided !
2 parents e6643e4 + 54c2044 commit 45d8232

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

index.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export function parse(connectionString: string): ConnectionOptions;
2+
3+
export interface ConnectionOptions {
4+
host: string | null;
5+
password: string | null;
6+
user: string | null;
7+
port: number | null;
8+
database: string | null;
9+
client_encoding: string | null;
10+
ssl: boolean | null;
11+
12+
application_name: string | null;
13+
fallback_application_name: string | null;
14+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "pg-connection-string",
33
"version": "0.1.3",
44
"description": "Functions for dealing with a PostgresSQL connection string",
5-
"main": "index.js",
5+
"main": "./index.js",
6+
"types": "./index.d.ts",
67
"scripts": {
78
"test": "tap ./test"
89
},

0 commit comments

Comments
 (0)