Skip to content

Commit

Permalink
Merge pull request #108 from malthe/const-enum
Browse files Browse the repository at this point in the history
Make (some more) enums const
  • Loading branch information
malthe authored Feb 28, 2024
2 parents f010ffe + 3704015 commit f4faac6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const enum SASL {
SASLResponse = 0x70,
}

export enum ErrorLevel {
export const enum ErrorLevel {
Debug1 = 'DEBUG1',
Debug2 = 'DEBUG2',
Debug3 = 'DEBUG3',
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export type BufferEncoding = NonNullable<
Required<Parameters<Buffer['toString']>[0]>
>;

export enum DataType {
export const enum DataType {
Bool = 16,
Bytea = 17,
Char = 18,
Expand Down Expand Up @@ -129,7 +129,7 @@ export const arrayDataTypeMapping: ReadonlyMap<DataType, DataType> = new Map([
[DataType.ArrayVarchar, DataType.Varchar],
]);

export enum DataFormat {
export const enum DataFormat {
Text,
Binary,
}
Expand Down

0 comments on commit f4faac6

Please sign in to comment.