Made enums all constants

This commit is contained in:
Dolan
2017-06-08 02:28:00 +01:00
parent 29a0cd79eb
commit 2dc0287a6b
33 changed files with 62 additions and 62 deletions

View File

@@ -1,7 +1,7 @@
import { Repository } from './repository';
export namespace Attr {
enum STATES {
const enum STATES {
UNSPECIFIED_T = 0,
TRUE_T = 1,
FALSE_T = 2,

View File

@@ -3,7 +3,7 @@ import { BlameOptions } from './blame-options';
import {BlameHunk} from './blame-hunk';
export namespace Blame {
enum FLAG {
const enum FLAG {
NORMAL = 0,
TRACK_COPIES_SAME_FILE = 1,
TRACK_COPIES_SAME_COMMIT_MOVES = 2,

View File

@@ -4,7 +4,7 @@ import { Commit } from './commit';
import { AnnotatedCommit } from './annotated-commit';
export namespace Branch {
enum BRANCH {
const enum BRANCH {
LOCAL = 1,
REMOTE = 2,
ALL = 3

View File

@@ -1,12 +1,12 @@
export namespace Cert {
enum TYPE {
const enum TYPE {
NONE = 0,
X509 = 1,
HOSTKEY_LIBSSH2 = 2,
STRARRAY = 3
}
enum SSH {
const enum SSH {
MD5 = 1,
SHA1 = 2
}

View File

@@ -7,7 +7,7 @@ import { Commit } from './commit';
import { Index } from './index';
export namespace Checkout {
enum NOTIFY {
const enum NOTIFY {
NONE = 0,
CONFLICT = 1,
DIRTY = 2,
@@ -17,7 +17,7 @@ export namespace Checkout {
ALL = 65535
}
enum STRATEGY {
const enum STRATEGY {
NONE = 0,
SAFE = 1,
FORCE = 2,

View File

@@ -2,7 +2,7 @@ import { Repository } from './repository';
import { CloneOptions } from './clone-options';
export namespace Clone {
enum LOCAL {
const enum LOCAL {
AUTO = 0,
LOCAL = 1,
NO_LOCAL = 2,

View File

@@ -1,7 +1,7 @@
import { Buf } from './buf';
export namespace Config {
enum LEVEL {
const enum LEVEL {
SYSTEM = 1,
XDG = 2,
GLOBAL = 3,

View File

@@ -1,5 +1,5 @@
export namespace Cred {
enum TYPE {
const enum TYPE {
USERPASS_PLAINTEXT = 1,
SSH_KEY = 2,
SSH_CUSTOM = 4,

View File

@@ -1,7 +1,7 @@
import { DiffBinaryFile } from './diff-binary-file';
export namespace DiffBinary {
enum DIFF_BINARY {
const enum DIFF_BINARY {
NONE = 0,
LITERAL = 1,
DELTA = 2

View File

@@ -18,7 +18,7 @@ export interface DiffFindOptions {
}
export namespace Diff {
enum DELTA {
const enum DELTA {
UNMODIFIED = 0,
ADDED = 1,
DELETED = 2,
@@ -32,7 +32,7 @@ export namespace Diff {
CONFLICTED = 10
}
enum FIND {
const enum FIND {
BY_CONFIG = 0,
RENAMES = 1,
RENAMES_FROM_REWRITES = 2,
@@ -51,14 +51,14 @@ export namespace Diff {
REMOVE_UNMODIFIED = 65536
}
enum FLAG {
const enum FLAG {
BINARY = 1,
NOT_BINARY = 2,
VALID_ID = 4,
EXISTS = 8
}
enum FORMAT {
const enum FORMAT {
PATCH = 1,
PATCH_HEADER = 2,
RAW = 3,
@@ -66,12 +66,12 @@ export namespace Diff {
NAME_STATUS = 5
}
enum FORMAT_EMAIL_FLAGS {
const enum FORMAT_EMAIL_FLAGS {
FORMAT_EMAIL_NONE = 0,
FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER = 1
}
enum LINE {
const enum LINE {
CONTEXT = 32,
ADDITION = 43,
DELETION = 45,
@@ -83,7 +83,7 @@ export namespace Diff {
BINARY = 66
}
enum OPTION {
const enum OPTION {
NORMAL = 0,
REVERSE = 1,
INCLUDE_IGNORED = 2,
@@ -115,7 +115,7 @@ export namespace Diff {
SHOW_BINARY = 1073741824
}
enum STATS_FORMAT {
const enum STATS_FORMAT {
STATS_NONE = 0,
STATS_FULL = 1,
STATS_SHORT = 2,

View File

@@ -1,23 +1,23 @@
export namespace Enums {
enum CVAR {
const enum CVAR {
FALSE = 0,
TRUE = 1,
INT32 = 2,
string = 3
}
enum DIRECTION {
const enum DIRECTION {
FETCH = 0,
PUSH = 1
}
enum FEATURE {
const enum FEATURE {
THREADS = 1,
HTTPS = 2,
SSH = 4
}
enum IDXENTRY_EXTENDED_FLAG {
const enum IDXENTRY_EXTENDED_FLAG {
IDXENTRY_INTENT_TO_ADD = 8192,
IDXENTRY_SKIP_WORKTREE = 16384,
IDXENTRY_EXTENDED2 = 32768,
@@ -34,7 +34,7 @@ export namespace Enums {
IDXENTRY_NEW_SKIP_WORKTREE = 512
}
enum INDXENTRY_FLAG {
const enum INDXENTRY_FLAG {
IDXENTRY_EXTENDED = 16384,
IDXENTRY_VALID = 32768
}

View File

@@ -1,5 +1,5 @@
export namespace Error {
enum ERROR {
const enum ERROR {
GITERR_NONE = 0,
GITERR_NOMEMORY = 1,
GITERR_OS = 2,
@@ -33,7 +33,7 @@ export namespace Error {
GITERR_FILESYSTEM = 30
}
enum CODE {
const enum CODE {
OK = 0,
ERROR = -1,
ENOTFOUND = -3,

View File

@@ -1,7 +1,7 @@
import { FetchOptions } from './fetch-options';
export namespace Fetch {
enum PRUNE {
const enum PRUNE {
GIT_FETCH_PRUNE_UNSPECIFIED = 0,
GIT_FETCH_PRUNE = 1,
GIT_FETCH_NO_PRUNE = 2

View File

@@ -5,12 +5,12 @@ import { Blob } from './blob';
import { Buf } from './buf';
export namespace Filter {
enum FLAG {
const enum FLAG {
DEFAULT = 0,
ALLOW_UNSAFE = 1
}
enum MODE {
const enum MODE {
TO_WORKTREE = 0,
SMUDGE = 0,
TO_ODB = 1,

View File

@@ -1,5 +1,5 @@
export namespace Hashsig {
enum OPTION {
const enum OPTION {
NORMAL = 0,
IGNORE_WHITESPACE = 1,
SMART_WHITESPACE = 2,

View File

@@ -5,14 +5,14 @@ import { Tree } from './tree';
import { Strarray } from './str-array';
export namespace Index {
enum ADD_OPTION {
const enum ADD_OPTION {
ADD_DEFAULT = 0,
ADD_FORCE = 1,
ADD_DISABLE_PATHSPEC_MATCH = 2,
ADD_CHECK_PATHSPEC = 4
}
enum CAP {
const enum CAP {
IGNORE_CASE = 1,
NO_FILEMODE = 2,
NO_SYMLINKS = 4,

View File

@@ -1,5 +1,5 @@
export namespace Libgit2 {
enum OPT {
const enum OPT {
GET_MWINDOW_SIZE = 0,
SET_MWINDOW_SIZE = 1,
GET_MWINDOW_MAPPED_LIMIT = 2,

View File

@@ -10,7 +10,7 @@ import { MergeOptions } from './merge-options';
import { MergeFileInput } from './merge-file-input';
export namespace Merge {
enum ANALYSIS {
const enum ANALYSIS {
NONE = 0,
NORMAL = 1,
UP_TO_DATE = 2,
@@ -18,14 +18,14 @@ export namespace Merge {
UNBORN = 8
}
enum FILE_FAVOR {
const enum FILE_FAVOR {
NORMAL = 0,
OURS = 1,
THEIRS = 2,
UNION = 3
}
enum FILE_FLAGS {
const enum FILE_FLAGS {
FILE_DEFAULT = 0,
FILE_STYLE_MERGE = 1,
FILE_STYLE_DIFF3 = 2,
@@ -37,13 +37,13 @@ export namespace Merge {
FILE_DIFF_MINIMAL = 128
}
enum PREFERENCE {
const enum PREFERENCE {
NONE = 0,
NO_FASTFORWARD = 1,
FASTFORWARD_ONLY = 2
}
enum TREE_FLAG {
const enum TREE_FLAG {
TREE_FIND_RENAMES = 1
}
}

View File

@@ -2,7 +2,7 @@ import { Oid } from './oid';
import { OdbObject } from './odb-object';
export namespace Odb {
enum STREAM {
const enum STREAM {
RDONLY = 2,
WRONLY = 4,
RW = 6

View File

@@ -3,7 +3,7 @@ import { Oid } from './oid';
import { Revwalk } from './rev-walk';
export namespace Packbuilder {
enum STAGE {
const enum STAGE {
ADDING_OBJECTS = 0,
DELTAFICATION = 1
}

View File

@@ -6,7 +6,7 @@ import { Index } from './index';
import { Strarray } from './str-array';
export namespace Pathspec {
enum FLAG {
const enum FLAG {
DEFAULT = 0,
IGNORE_CASE = 1,
USE_CASE = 2,

View File

@@ -1,7 +1,7 @@
import { Oid } from './oid';
export namespace RebaseOperation {
enum REBASE_OPERATION {
const enum REBASE_OPERATION {
PICK = 0,
REWORD = 1,
EDIT = 2,

View File

@@ -3,14 +3,14 @@ import { Oid } from './oid';
import { Object } from './object';
export namespace Reference {
enum TYPE {
const enum TYPE {
INVALID = 0,
OID = 1,
SYMBOLIC = 2,
LISTALL = 3
}
enum NORMALIZE {
const enum NORMALIZE {
REF_FORMAT_NORMAL = 0,
REF_FORMAT_ALLOW_ONELEVEL = 1,
REF_FORMAT_REFSPEC_PATTERN = 2,

View File

@@ -9,14 +9,14 @@ import { PushOptions } from './push-options';
import { Refspec } from './ref-spec';
export namespace Remote {
enum AUTOTAG_OPTION {
const enum AUTOTAG_OPTION {
DOWNLOAD_TAGS_UNSPECIFIED = 0,
DOWNLOAD_TAGS_AUTO = 1,
DOWNLOAD_TAGS_NONE = 2,
DOWNLOAD_TAGS_ALL = 3
}
enum COMPLETION_TYPE {
const enum COMPLETION_TYPE {
COMPLETION_DOWNLOAD = 0,
COMPLETION_INDEXING = 1,
COMPLETION_ERROR = 2

View File

@@ -5,7 +5,7 @@ import { Strarray } from './str-array';
import { CheckoutOptions } from './checkout-options';
export namespace Reset {
enum TYPE {
const enum TYPE {
SOFT = 1,
MIXED = 2,
HARD = 3

View File

@@ -3,7 +3,7 @@ import { Repository } from './repository';
import { Reference } from './reference';
export namespace Revparse {
enum MODE {
const enum MODE {
SINGLE = 1,
RANGE = 2,
MERGE_BASE = 4

View File

@@ -3,7 +3,7 @@ import { Oid } from './oid';
import { Commit } from './commit';
export namespace Revwalk {
enum SORT {
const enum SORT {
NONE = 0,
TOPOLOGICAL = 1,
TIME = 2,

View File

@@ -4,12 +4,12 @@ import { Oid } from './oid';
import { CheckoutOptions } from './checkout-options';
export namespace Stash {
enum APPLY_FLAGS {
const enum APPLY_FLAGS {
APPLY_DEFAULT = 0,
APPLY_REINSTATE_INDEX = 1
}
enum APPLY_PROGRESS {
const enum APPLY_PROGRESS {
NONE = 0,
LOADING_STASH = 1,
ANALYZE_INDEX = 2,
@@ -20,7 +20,7 @@ export namespace Stash {
DONE = 7
}
enum FLAGS {
const enum FLAGS {
DEFAULT = 0,
KEEP_INDEX = 1,
INCLUDE_UNTRACKED = 2,

View File

@@ -4,7 +4,7 @@ import { StatusEntry } from './status-entry';
import { StatusOptions } from './status-options';
export namespace Status {
enum STATUS {
const enum STATUS {
CURRENT = 0,
INDEX_NEW = 1,
INDEX_MODIFIED = 2,
@@ -21,7 +21,7 @@ export namespace Status {
CONFLICTED = 32768
}
enum OPT {
const enum OPT {
INCLUDE_UNTRACKED = 1,
INCLUDE_IGNORED = 2,
INCLUDE_UNMODIFIED = 4,
@@ -40,7 +40,7 @@ export namespace Status {
INCLUDE_UNREADABLE_AS_UNTRACKED = 32768
}
enum SHOW {
const enum SHOW {
INDEX_AND_WORKDIR = 0,
INDEX_ONLY = 1,
WORKDIR_ONLY = 2

View File

@@ -4,7 +4,7 @@ import { Oid } from './oid';
import { SubmoduleUpdateOptions } from './submodule-update-options';
export namespace Submodule {
enum IGNORE {
const enum IGNORE {
UNSPECIFIED = -1,
NONE = 1,
UNTRACKED = 2,
@@ -12,13 +12,13 @@ export namespace Submodule {
ALL = 4
}
enum RECURSE {
const enum RECURSE {
NO = 0,
YES = 1,
ONDEMAND = 2
}
enum STATUS {
const enum STATUS {
IN_HEAD = 1,
IN_INDEX = 2,
IN_CONFIG = 4,
@@ -35,7 +35,7 @@ export namespace Submodule {
WD_UNTRACKED = 8192
}
enum UPDATE {
const enum UPDATE {
CHECKOUT = 1,
REBASE = 2,
MERGE = 3,

View File

@@ -2,7 +2,7 @@ import { Remote } from './remote';
import { Strarray } from './str-array';
export namespace Transport {
enum FLAGS {
const enum FLAGS {
NONE = 0
}
}

View File

@@ -3,7 +3,7 @@ import { Oid } from './oid';
import { Blob } from './blob';
export namespace TreeEntry {
enum FILEMODE {
const enum FILEMODE {
UNREADABLE = 0,
TREE = 16384,
BLOB = 33188,

View File

@@ -6,7 +6,7 @@ import { Treebuilder } from './tree-builder';
import { DiffFile } from './diff-file';
export namespace Tree {
enum WALK_MODE {
const enum WALK_MODE {
WALK_PRE = 0,
WALK_POST = 1
}