Admin /api/map endpoint return type is now generated with generic type guards
This commit is contained in:
parent
d0d191fc28
commit
a4a123c331
9 changed files with 60 additions and 22 deletions
11
pusher/src/Services/AdminApi/CharacterTexture.ts
Normal file
11
pusher/src/Services/AdminApi/CharacterTexture.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import * as tg from "generic-type-guard";
|
||||
|
||||
export const isCharacterTexture = new tg.IsInterface()
|
||||
.withProperties({
|
||||
id: tg.isNumber,
|
||||
level: tg.isNumber,
|
||||
url: tg.isString,
|
||||
rights: tg.isString,
|
||||
})
|
||||
.get();
|
||||
export type CharacterTexture = tg.GuardedType<typeof isCharacterTexture>;
|
Loading…
Add table
Add a link
Reference in a new issue