Fixing new MapDetails type guard
It was working improperly with messages from the admin
This commit is contained in:
parent
e220bf56db
commit
e660e25616
2 changed files with 5 additions and 5 deletions
|
@ -9,13 +9,13 @@ import { isNumber } from "generic-type-guard";
|
|||
|
||||
export const isMapDetailsData = new tg.IsInterface()
|
||||
.withProperties({
|
||||
roomSlug: tg.isOptional(tg.isString), // deprecated
|
||||
mapUrl: tg.isString,
|
||||
policy_type: isNumber, //isNumericEnum(GameRoomPolicyTypes),
|
||||
tags: tg.isArray(tg.isString),
|
||||
textures: tg.isArray(isCharacterTexture),
|
||||
contactPage: tg.isUnion(tg.isString, tg.isUndefined),
|
||||
authenticationMandatory: tg.isUnion(tg.isBoolean, tg.isUndefined),
|
||||
authenticationMandatory: tg.isUnion(tg.isNullable(tg.isBoolean), tg.isUndefined),
|
||||
roomSlug: tg.isNullable(tg.isString), // deprecated
|
||||
contactPage: tg.isNullable(tg.isString),
|
||||
group: tg.isNullable(tg.isString),
|
||||
})
|
||||
.withOptionalProperties({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue