refactor: Convert all enums to const object types in nodes-base (no-changelog) (#14131)

This commit is contained in:
Alex Grozav
2025-03-24 14:40:19 +02:00
committed by GitHub
parent defeb2e817
commit b9608647ca
31 changed files with 422 additions and 345 deletions

View File

@@ -31,11 +31,13 @@ export interface IUser {
type?: Type;
isAnonymous?: boolean;
}
const enum Type {
TYPE_UNSPECIFIED,
HUMAN,
BOT,
}
const Types = {
TYPE_UNSPECIFIED: 0,
HUMAN: 1,
BOT: 2,
} as const;
export type Type = (typeof Types)[keyof typeof Types];
// // TODO: define other interfaces
//