Skip to content

Commit 58840f2

Browse files
authored
feat: no const enum (#52)
1 parent d79ca5f commit 58840f2

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

index.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface CommitOptions {
2121
committer?: SignaturePayload
2222
parents?: Array<string>
2323
}
24-
export const enum DiffFlags {
24+
export enum DiffFlags {
2525
/** File(s) treated as binary data. */
2626
Binary = 1,
2727
/** File(s) treated as text data. */
@@ -299,7 +299,7 @@ export interface IndexUpdateAllOptions {
299299
onMatch?: (args: IndexOnMatchCallbackArgs) => number
300300
}
301301
/** An enumeration all possible kinds objects may have. */
302-
export const enum ObjectType {
302+
export enum ObjectType {
303303
/** Any kind of git object */
304304
Any = 0,
305305
/** An object which corresponds to a git commit */
@@ -360,7 +360,7 @@ export type ReferenceType = /** A reference which points at an object id. */
360360
*/
361361
export declare function isValidReferenceName(refname: string): boolean
362362
/** Options for normalize reference name. */
363-
export const enum ReferenceFormat {
363+
export enum ReferenceFormat {
364364
/** No particular normalization. */
365365
Normal = 0,
366366
/**
@@ -605,7 +605,7 @@ export interface PruneOptions {
605605
/** A listing of the possible states that a repository can be in. */
606606
export type RepositoryState = 'Clean' | 'Merge' | 'Revert' | 'RevertSequence' | 'CherryPick' | 'CherryPickSequence' | 'Bisect' | 'Rebase' | 'RebaseInteractive' | 'RebaseMerge' | 'ApplyMailbox' | 'ApplyMailboxOrRebase';
607607
/** Mode options for `RepositoryInitOptions`. */
608-
export const enum RepositoryInitMode {
608+
export enum RepositoryInitMode {
609609
/** Use permissions configured by umask (default) */
610610
SharedUnmask = 0,
611611
/**
@@ -730,7 +730,7 @@ export interface RepositoryOpenOptions {
730730
ceilingDirs?: Array<string>
731731
}
732732
/** Flags for opening repository. */
733-
export const enum RepositoryOpenFlags {
733+
export enum RepositoryOpenFlags {
734734
/** Only open the specified path; don't walk upward searching. */
735735
NoSearch = 1,
736736
/** Search across filesystem boundaries. */
@@ -783,7 +783,7 @@ export declare function discoverRepository(path: string, signal?: AbortSignal |
783783
*/
784784
export declare function cloneRepository(url: string, path: string, options?: RepositoryCloneOptions | undefined | null, signal?: AbortSignal | undefined | null): Promise<Repository>
785785
/** Flags for the revparse. */
786-
export const enum RevparseMode {
786+
export enum RevparseMode {
787787
/** The spec targeted a single object */
788788
Single = 1,
789789
/** The spec targeted a range of commits */
@@ -803,7 +803,7 @@ export interface Revspec {
803803
mode: number
804804
}
805805
/** Orderings that may be specified for Revwalk iteration. */
806-
export const enum RevwalkSort {
806+
export enum RevwalkSort {
807807
/**
808808
* Sort the repository contents in no particular ordering.
809809
*

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
],
3636
"scripts": {
3737
"prepublishOnly": "napi prepublish -t npm",
38-
"build": "napi build --platform --release --pipe=\"yarn transform:dts\"",
39-
"build:debug": "DEBUG=\"napi:*\" napi build --platform --pipe=\"yarn transform:dts\"",
38+
"build": "napi build --platform --release --no-const-enum --pipe=\"yarn transform:dts\"",
39+
"build:debug": "DEBUG=\"napi:*\" napi build --platform --no-const-enum --pipe=\"yarn transform:dts\"",
4040
"transform:dts": "jscodeshift -t transforms/dts.mjs index.d.ts",
4141
"check": "biome check",
4242
"check:fix": "biome check --write --unsafe"

0 commit comments

Comments
 (0)