Skip to content

Commit

Permalink
avoid using enums in favor of frozen object literals
Browse files Browse the repository at this point in the history
  • Loading branch information
brainkim committed Nov 8, 2021
1 parent 30b4469 commit 69e15bd
Show file tree
Hide file tree
Showing 7 changed files with 218 additions and 183 deletions.
3 changes: 3 additions & 0 deletions src/jsutils/ValueTypes.ts
@@ -0,0 +1,3 @@
/** Used to extract values from enum-like objects. */
export type ValueTypes<TObj extends { [key: string]: unknown }> =
TObj[keyof TObj];

0 comments on commit 69e15bd

Please sign in to comment.