Added type definitions for git-rev-sync

This commit is contained in:
khoi-fish 2018-10-23 15:00:59 -07:00
parent 3b01bb29b1
commit 7bd54136c2
4 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,13 @@
import * as gitRevSync from "git-rev-sync";
gitRevSync.branch();
gitRevSync.count();
gitRevSync.date();
gitRevSync.isDirty();
gitRevSync.isTagDirty();
gitRevSync.long();
gitRevSync.message();
gitRevSync.remoteUrl();
gitRevSync.short();
gitRevSync.short();
gitRevSync.tag();

15
types/git-rev-sync/index.d.ts vendored Normal file
View File

@ -0,0 +1,15 @@
// Type definitions for git-rev-sync 1.12.0
// Project: https://github.com/tblobaum/git-rev
// Definitions by: Khoi Nguyen <http://hellokhoi.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function short(filePath?: string, length?: number): string;
export function long(filePath?: string): string;
export function branch(branch?: string): void;
export function count(): number;
export function date(): Date;
export function isDirty(): boolean;
export function isTagDirty(): boolean;
export function message(): string;
export function remoteUrl(): string;
export function tag(makeDirty?: boolean): string;

View File

@ -0,0 +1,16 @@
{
"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-rev-sync-tests.ts"]
}

View File

@ -0,0 +1,6 @@
{
"extends": "dtslint/dt.json",
"rules": {
"dt-header": false
}
}