adds typings for the 'env-paths' package

This commit is contained in:
Daniel Byrne
2018-08-28 12:48:20 -07:00
parent 98408751da
commit 6e9c836e20
4 changed files with 44 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
import envPaths = require('env-paths');
// $ExpectType Paths
envPaths('./');
+18
View File
@@ -0,0 +1,18 @@
// Type definitions for env-paths 1.0
// Project: https://github.com/sindresorhus/env-paths
// Definitions by: Daniel Byrne <https://github.com/danwbyrne>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = envPaths;
declare function envPaths(name: string, opts?: { suffix: string; }): envPaths.Paths;
declare namespace envPaths {
interface Paths {
readonly data: string;
readonly config: string;
readonly cache: string;
readonly log: string;
readonly temp: string;
}
}
+19
View File
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"env-paths-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}