Merge pull request #31689 from BendingBender/git-user-name

[git-user-name] Add types
This commit is contained in:
Wesley Wigham
2018-12-25 22:40:45 -08:00
committed by GitHub
4 changed files with 46 additions and 0 deletions
@@ -0,0 +1,6 @@
import userName = require('git-user-name');
userName(); // $ExpectType string | null
userName({ cwd: 'foo' }); // $ExpectType string | null
userName({ path: 'foo' }); // $ExpectType string | null
userName({ gitconfig: 'foo' }); // $ExpectType string | null
+16
View File
@@ -0,0 +1,16 @@
// Type definitions for git-user-name 2.0
// Project: https://github.com/jonschlinkert/git-user-name
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = gitUserName;
declare function gitUserName(options?: gitUserName.Options): string | null;
declare namespace gitUserName {
interface Options {
cwd?: string;
path?: string;
gitconfig?: string;
}
}
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"git-user-name-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }