mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 19:14:32 +02:00
format, lint, more enums, revert fn rename
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
// This works for both enums and regular objects.
|
||||
export function checkEnum<T extends Record<string, unknown>>(obj: T, value: unknown): value is T[keyof T] {
|
||||
return Object.values(obj).includes(value);
|
||||
}
|
||||
Reference in New Issue
Block a user