DefinitelyTyped/types/git-branch/git-branch-tests.ts
2018-12-31 08:04:17 -08:00

19 lines
389 B
TypeScript

import gitBranch = require('git-branch');
gitBranch()
.then((name) => {
name; // $ExpectType string
});
gitBranch('cwd')
.then((name) => {
name; // $ExpectType string
});
gitBranch.sync(); // $ExpectType string
gitBranch.sync('cwd'); // $ExpectType string
gitBranch((err, name) => {}); // $ExpectType void
gitBranch('cwd', (err, name) => {}); // $ExpectType void