diff --git a/packages/typed-binary/src/structure/types.ts b/packages/typed-binary/src/structure/types.ts index 96d4118..8a8671d 100644 --- a/packages/typed-binary/src/structure/types.ts +++ b/packages/typed-binary/src/structure/types.ts @@ -149,10 +149,11 @@ export class Ref { // Generic types //// -export enum SubTypeKey { - STRING = 'STRING', - ENUM = 'ENUM', -} +export type SubTypeKey = 'string' | 'enum'; +export const SubTypeKey = { + STRING: 'string', + ENUM: 'enum', +} as const; export interface IRefResolver { hasKey(key: string): boolean;