-
-
Save Fleker/cf05bbb1e79ecc71e52cf631cc4c4d87 to your computer and use it in GitHub Desktop.
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
import {assert} from '@fleker/gents' | |
interface Item { | |
label: string | |
description: string | |
recovery: number | |
} | |
export const ITEM_MAP = { | |
potion: assert<Item>({ | |
label: 'Potion', | |
description: 'Heals 50 HP', | |
recovery: 50, | |
}), | |
elixir: assert<Item>({ | |
label: 'Elixir', | |
description: 'Heals 100 HP', | |
recovery: 100, | |
}), | |
wishdust: assert<Item>({ | |
label: 'Wish Dust', | |
description: 'Heals all HP', | |
recovery: Infinity | |
}), | |
} | |
export type ItemId = keyof typeof ITEM_MAP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment