Skip to content

Instantly share code, notes, and snippets.

@coreymcmahon
Created November 14, 2022 10:13
Show Gist options
  • Save coreymcmahon/b34eab847636bfe61fcfc73d2c982da6 to your computer and use it in GitHub Desktop.
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)
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