More eslint fixes (+ ignoring no-unsafe-argument rule for now)
This commit is contained in:
parent
98d3a58861
commit
0c281db411
9 changed files with 76 additions and 21 deletions
23
messages/JsonMessages/AdminApiData.ts
Normal file
23
messages/JsonMessages/AdminApiData.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import * as tg from "generic-type-guard";
|
||||
import { isCharacterTexture} from "./CharacterTexture";
|
||||
|
||||
/*
|
||||
* WARNING! The original file is in /messages/JsonMessages.
|
||||
* All other files are automatically copied from this file on container startup / build
|
||||
*/
|
||||
|
||||
export const isAdminApiData = new tg.IsInterface()
|
||||
.withProperties({
|
||||
roomUrl: tg.isString,
|
||||
email: tg.isNullable(tg.isString),
|
||||
mapUrlStart: tg.isString,
|
||||
tags: tg.isArray(tg.isString),
|
||||
policy_type: tg.isNumber,
|
||||
userUuid: tg.isString,
|
||||
textures: tg.isArray(isCharacterTexture),
|
||||
})
|
||||
.withOptionalProperties({
|
||||
messages: tg.isArray(tg.isUnknown),
|
||||
})
|
||||
.get();
|
||||
export type AdminApiData = tg.GuardedType<typeof isAdminApiData>;
|
24
messages/JsonMessages/RegisterData.ts
Normal file
24
messages/JsonMessages/RegisterData.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
import * as tg from "generic-type-guard";
|
||||
import { isCharacterTexture} from "./CharacterTexture";
|
||||
|
||||
/*
|
||||
* WARNING! The original file is in /messages/JsonMessages.
|
||||
* All other files are automatically copied from this file on container startup / build
|
||||
*/
|
||||
|
||||
export const isRegisterData = new tg.IsInterface()
|
||||
.withProperties({
|
||||
roomUrl: tg.isString,
|
||||
email: tg.isNullable(tg.isString),
|
||||
organizationMemberToken: tg.isNullable(tg.isString),
|
||||
mapUrlStart: tg.isString,
|
||||
userUuid: tg.isString,
|
||||
textures: tg.isArray(isCharacterTexture),
|
||||
authToken: tg.isString,
|
||||
|
||||
})
|
||||
.withOptionalProperties({
|
||||
messages: tg.isArray(tg.isUnknown),
|
||||
})
|
||||
.get();
|
||||
export type RegisterData = tg.GuardedType<typeof isRegisterData>;
|
Loading…
Add table
Add a link
Reference in a new issue