diff --git a/types/nodegit/attr.d.ts b/types/nodegit/attr.d.ts new file mode 100644 index 0000000000..84a701f2b1 --- /dev/null +++ b/types/nodegit/attr.d.ts @@ -0,0 +1,18 @@ +import { Repository } from './repository'; + +export namespace Attr { + enum STATES { + UNSPECIFIED_T = 0, + TRUE_T = 1, + FALSE_T = 2, + VALUE_T = 3 + } +} + +export class Attr { + static addMacro(repo: Repository, name: string, values: string): number; + static cacheFlush(repo: Repository): void; + static get(repo: Repository, flags: number, path: string, name: string): Promise; + static getMany(repo: Repository, flags: number, path: string, num_attr: number, names: string): any[]; + static value(attr: string): number; +} diff --git a/types/nodegit/index.d.ts b/types/nodegit/index.d.ts index feeec58469..1f672ba3b4 100644 --- a/types/nodegit/index.d.ts +++ b/types/nodegit/index.d.ts @@ -4,6 +4,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export { AnnotatedCommit } from './annotated-commit'; +export { Attr } from './attr'; export { Blob } from './blob'; export { Branch } from './branch'; export { Buf } from './buf'; diff --git a/types/nodegit/tsconfig.json b/types/nodegit/tsconfig.json index e57dc2776b..4192e1fc08 100644 --- a/types/nodegit/tsconfig.json +++ b/types/nodegit/tsconfig.json @@ -17,6 +17,7 @@ }, "files": [ "annotated-commit.d.ts", + "attr.d.ts", "blob.d.ts", "branch.d.ts", "buf.d.ts",