Merge pull request #10 from NoNameProvided/patch-1

Add support for Typescript typings

thanks @NoNameProvided  !
This commit is contained in:
Luis Montes 2017-06-27 10:09:14 -07:00 committed by GitHub
commit 45d82320b7
2 changed files with 16 additions and 1 deletions

14
index.d.ts vendored Normal file
View File

@ -0,0 +1,14 @@
export function parse(connectionString: string): ConnectionOptions;
export interface ConnectionOptions {
host: string | null;
password: string | null;
user: string | null;
port: number | null;
database: string | null;
client_encoding: string | null;
ssl: boolean | null;
application_name: string | null;
fallback_application_name: string | null;
}

View File

@ -2,7 +2,8 @@
"name": "pg-connection-string",
"version": "0.1.3",
"description": "Functions for dealing with a PostgresSQL connection string",
"main": "index.js",
"main": "./index.js",
"types": "./index.d.ts",
"scripts": {
"test": "tap ./test"
},