Skip to content

Commit 8070a22

Browse files
committed
fix: Modernized SubTypeKey
1 parent e549efc commit 8070a22

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • packages/typed-binary/src/structure

packages/typed-binary/src/structure/types.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,11 @@ export class Ref<K extends string> {
149149
// Generic types
150150
////
151151

152-
export enum SubTypeKey {
153-
STRING = 'STRING',
154-
ENUM = 'ENUM',
155-
}
152+
export type SubTypeKey = 'string' | 'enum';
153+
export const SubTypeKey = {
154+
STRING: 'string',
155+
ENUM: 'enum',
156+
} as const;
156157

157158
export interface IRefResolver {
158159
hasKey(key: string): boolean;

0 commit comments

Comments
 (0)