Skip to content

Commit

Permalink
improving the typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly-t committed Aug 20, 2019
1 parent 5bbcf75 commit 9523c3c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "connection-string",
"version": "2.7.2",
"version": "2.8.0",
"description": "Advanced URL Connection String parser + generator.",
"main": "src/index.js",
"typings": "src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class ConnectionString {
constructor(cs: string, defaults?: IConnectionDefaults)

protocol?: string;
hosts?: Array<IHost>;
hosts?: Array<IParsedHost>;
user?: string;
password?: string;
path?: string[];
Expand Down
2 changes: 2 additions & 0 deletions test/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const c = new ConnectionString('protocol://', {
path: ['one', 'two']
});

const h1 = a.hosts && a.hosts[0].toString();

if ('protocol' in a) {
const protocol = a.protocol;
const pass = a.password;
Expand Down

0 comments on commit 9523c3c

Please sign in to comment.