diff --git a/types/prometheus-gc-stats/index.d.ts b/types/prometheus-gc-stats/index.d.ts new file mode 100644 index 0000000000..007cf28bed --- /dev/null +++ b/types/prometheus-gc-stats/index.d.ts @@ -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 +// 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; diff --git a/types/prometheus-gc-stats/prometheus-gc-stats-tests.ts b/types/prometheus-gc-stats/prometheus-gc-stats-tests.ts new file mode 100644 index 0000000000..abc7542aa0 --- /dev/null +++ b/types/prometheus-gc-stats/prometheus-gc-stats-tests.ts @@ -0,0 +1,5 @@ +import gcStats = require('prometheus-gc-stats'); + +const testFunc = gcStats('something'); +// $ExpectType void +testFunc(); diff --git a/types/prometheus-gc-stats/tsconfig.json b/types/prometheus-gc-stats/tsconfig.json new file mode 100644 index 0000000000..1fcdb90ce8 --- /dev/null +++ b/types/prometheus-gc-stats/tsconfig.json @@ -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" + ] +} diff --git a/types/prometheus-gc-stats/tslint.json b/types/prometheus-gc-stats/tslint.json new file mode 100644 index 0000000000..d88586e5bd --- /dev/null +++ b/types/prometheus-gc-stats/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}