Skip to content

Commit

Permalink
add tsd check
Browse files Browse the repository at this point in the history
  • Loading branch information
adilhafeez committed Sep 30, 2021
1 parent bcd7d5d commit 0d591f9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ jobs:
run: npm i
- name: Test
run: npm run test
- name: TSD Check
run: npx tsd-check
17 changes: 17 additions & 0 deletions index.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Pushgateway } from './index';

const pushGateway = new Pushgateway('');
pushGateway.push({ jobName: '' }).then(({ resp, body }) => {
console.log(resp);
console.log(body);
});

pushGateway.pushAdd({ jobName: '' }).then(({ resp, body }) => {
console.log(resp);
console.log(body);
});

pushGateway.delete({ jobName: '' }).then(({ resp, body }) => {
console.log(resp);
console.log(body);
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"typescript": "^4.0.2"
},
"dependencies": {
"tdigest": "^0.1.1"
"tdigest": "^0.1.1",
"tsd-check": "^0.6.0"
},
"types": "./index.d.ts",
"jest": {
Expand Down

0 comments on commit 0d591f9

Please sign in to comment.