From 59c7f36e1df68a33ff7dd10c20ff4e3a90ce56c1 Mon Sep 17 00:00:00 2001 From: Dolan Date: Wed, 7 Jun 2017 01:34:38 +0100 Subject: [PATCH] Added Libgit2 --- types/nodegit/index.d.ts | 1 + types/nodegit/lib-git2.d.ts | 25 +++++++++++++++++++++++++ types/nodegit/tsconfig.json | 1 + 3 files changed, 27 insertions(+) create mode 100644 types/nodegit/lib-git2.d.ts diff --git a/types/nodegit/index.d.ts b/types/nodegit/index.d.ts index a8253f700f..c9e56f125e 100644 --- a/types/nodegit/index.d.ts +++ b/types/nodegit/index.d.ts @@ -18,6 +18,7 @@ export { Enums } from './enums'; export { FetchOptions } from './fetch-options'; export { Index } from './index_'; export { IndexEntry } from './index-entry'; +export { Libgit2 } from './lib-git2'; export { MergeFileInput } from './merge-file-input'; export { MergeFileOptions } from './merge-file-options'; export { MergeFileResult } from './merge-file-result'; diff --git a/types/nodegit/lib-git2.d.ts b/types/nodegit/lib-git2.d.ts new file mode 100644 index 0000000000..9d7f1a5281 --- /dev/null +++ b/types/nodegit/lib-git2.d.ts @@ -0,0 +1,25 @@ +export namespace Libgit2 { + enum OPT { + GET_MWINDOW_SIZE = 0, + SET_MWINDOW_SIZE = 1, + GET_MWINDOW_MAPPED_LIMIT = 2, + SET_MWINDOW_MAPPED_LIMIT = 3, + GET_SEARCH_PATH = 4, + SET_SEARCH_PATH = 5, + SET_CACHE_OBJECT_LIMIT = 6, + SET_CACHE_MAX_SIZE = 7, + ENABLE_CACHING = 8, + GET_CACHED_MEMORY = 9, + GET_TEMPLATE_PATH = 10, + SET_TEMPLATE_PATH = 11, + SET_SSL_CERT_LOCATIONS = 12 + } +} + +export class Libgit2 { + static features(): number; + static init(): number; + static opts(option: number): number; + static shutdown(): number; + static version(major: number, minor: number, rev: number): void; +} diff --git a/types/nodegit/tsconfig.json b/types/nodegit/tsconfig.json index 28a3d8e30b..faae7d850e 100644 --- a/types/nodegit/tsconfig.json +++ b/types/nodegit/tsconfig.json @@ -31,6 +31,7 @@ "fetch-options.d.ts", "index-entry.d.ts", "index.d.ts", + "lib-git2.d.ts", "merge-file-input.d.ts", "merge-file-options.d.ts", "merge-file-result.d.ts",