feat: support hazard
This commit is contained in:
parent
22c62d30d0
commit
21491e2001
@ -13,6 +13,7 @@ enum HeroKey {
|
||||
echo,
|
||||
genji,
|
||||
hanzo,
|
||||
hazard,
|
||||
illari,
|
||||
juno,
|
||||
junkrat,
|
||||
|
47
test.ts
47
test.ts
@ -1,47 +0,0 @@
|
||||
type HEROES_KEYS =
|
||||
| "ana"
|
||||
| "ashe"
|
||||
| "baptiste"
|
||||
| "bastion"
|
||||
| "brigitte"
|
||||
| "cassidy"
|
||||
| "dva"
|
||||
| "doomfist"
|
||||
| "echo"
|
||||
| "genji"
|
||||
| "hanzo"
|
||||
| "junker-queen"
|
||||
| "junkrat"
|
||||
| "kiriko"
|
||||
| "lucio"
|
||||
| "mei"
|
||||
| "mercy"
|
||||
| "moira"
|
||||
| "orisa"
|
||||
| "pharah"
|
||||
| "ramattra"
|
||||
| "reaper"
|
||||
| "reinhardt"
|
||||
| "roadhog"
|
||||
| "sigma"
|
||||
| "sojourn"
|
||||
| "soldier-76"
|
||||
| "sombra"
|
||||
| "symmetra"
|
||||
| "torbjorn"
|
||||
| "tracer"
|
||||
| "widowmaker"
|
||||
| "winston"
|
||||
| "wrecking-ball"
|
||||
| "zarya"
|
||||
| "zenyatta";
|
||||
|
||||
type NEW_HEROES_KEYS<T extends string | number | symbol> = T extends HEROES_KEYS
|
||||
? HEROES_KEYS
|
||||
: T | HEROES_KEYS;
|
||||
|
||||
function fn<T extends string | number | symbol>(key: NEW_HEROES_KEYS<T>) {
|
||||
console.log(key);
|
||||
}
|
||||
|
||||
// fn('')
|
Loading…
x
Reference in New Issue
Block a user