pg-connection-string: Provides its own types (#22375)

This commit is contained in:
Andy
2017-12-20 15:33:01 -08:00
committed by GitHub
parent bcde7a1be3
commit d0df8af318
5 changed files with 6 additions and 54 deletions
+6
View File
@@ -552,6 +552,12 @@
"sourceRepoURL": "https://github.com/pillarjs/path-to-regexp",
"asOfVersion": "1.7.0"
},
{
"libraryName": "pg-connection-string",
"typingsPackageName": "pg-connection-string",
"sourceRepoURL": "https://github.com/iceddev/pg-connection-string",
"asOfVersion": "2.0.0"
},
{
"libraryName": "pg-promise",
"typingsPackageName": "pg-promise",
-17
View File
@@ -1,17 +0,0 @@
// Type definitions for pg-connection-string 0.1
// Project: https://github.com/iceddev/pg-connection-string
// Definitions by: Bradley Ayers <https://github.com/bradleyayers>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
export function parse(connectionString: string): {
host: string;
database: string | null;
port: string | null;
application_name?: string;
client_encoding?: string;
fallback_application_name?: string;
user?: string;
password?: string;
ssl?: boolean;
};
@@ -1,13 +0,0 @@
import { parse } from 'pg-connection-string';
const parts = parse('postgres://user:password@host:port/dbname');
parts.application_name;
parts.client_encoding;
parts.database;
parts.fallback_application_name;
parts.host;
parts.password;
parts.port;
parts.ssl;
parts.user;
-23
View File
@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"pg-connection-string-tests.ts"
]
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }