From 8070a2286844db12372fc214a29c14e95db73944 Mon Sep 17 00:00:00 2001 From: Iwo Plaza Date: Wed, 18 Dec 2024 13:06:20 +0100 Subject: [PATCH] fix: Modernized SubTypeKey --- packages/typed-binary/src/structure/types.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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;