adds typings for the 'prometheus-gc-stats' package

This commit is contained in:
Daniel Byrne
2018-08-28 19:07:14 -07:00
parent 1097db8321
commit 8e7644b910
4 changed files with 36 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
// Type definitions for prometheus-gc-stats 0.6
// Project: https://github.com/SimenB/node-prometheus-gc-stats
// Definitions by: Daniel Byrne <https://github.com/danwbyrne>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// register is typeof require('prom-client').Registry which has its own .d.ts
declare function gcStats(register: any): () => void;
export = gcStats;
@@ -0,0 +1,5 @@
import gcStats = require('prometheus-gc-stats');
const testFunc = gcStats('something');
// $ExpectType void
testFunc();
+19
View File
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"prometheus-gc-stats-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}