Created
November 14, 2022 10:13
-
-
Save coreymcmahon/b34eab847636bfe61fcfc73d2c982da6 to your computer and use it in GitHub Desktop.
Create an enum-like type, without using enums directly (which has some peculiarities)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const ReturnStatus = { | |
UNFILED: 0, | |
FILED: 1, | |
COMMITTED: 2, | |
PAID: 3, | |
PARTIALLY_PAID: 4, | |
} as const; | |
type ReturnStatus = typeof ReturnStatus[keyof typeof ReturnStatus]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment