Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from stackworx/feat/typescript-definitions
Browse files Browse the repository at this point in the history
Add typescript definitions
  • Loading branch information
benesch authored Mar 28, 2019
2 parents 28bfad3 + 3a3020e commit a26eb1f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
declare module "pg-range" {
import { default as StRange } from "strange";

// Must use any here as we cannot use a namespace as a type
export function install(pg: any): void;

type Endpoint = Date | number | string;

export class Range<T extends Endpoint> extends StRange<T> {
toPostgres(prepare: any): string;
}
}
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
"type": "git",
"url": "git://github.com/WhoopInc/node-pg-range"
},
"files": [
"lib",
"index.js",
"index.d.ts"
],
"keywords": [
"postgres",
"parsing",
Expand Down

0 comments on commit a26eb1f

Please sign in to comment.