Answer the question
In order to leave comments, you need to log in
Is it possible to check for existence in an enum in typescript?
Whether it is possible to make the interface in which value will be checked for presence in enum? I don't know how to ask) Well... I have to pass exactly 1 value from enum to type (enemy type). Is it possible to do so?
export enum EnemiesTypes {
BEAST = "BEAST",
UNDEAD = "UNDEAD",
FLYING = "FLYING",
DRAGON = "DRAGON",
FIEND = "FIEND",
HUMANOID = "HUMANOID",
MACHINE = "MACHINE",
PLANT = "PLANT",
FLAN = "FLAN",
STONE = "STONE",
HEAVY = "HEAVY"
};
export interface EnemyCharacteristics {
type: // что тут дописать?
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question