d1e8243c47
* Zod EVERYWHERE * Add no-unused-vars rule to eslint in front * Add no-unused-vars rule to eslint in pusher * Add no-unused-vars rule to eslint in back * Remove unused PlayerTexture guards * Fix data providing on room connection Co-authored-by: Alexis Faizeau <a.faizeau@workadventu.re>
19 lines
455 B
TypeScript
19 lines
455 B
TypeScript
import { z } from "zod";
|
|
|
|
export const isButtonDescriptor = z.object({
|
|
label: z.string(),
|
|
className: z.optional(z.string()),
|
|
});
|
|
|
|
export const isOpenPopupEvent = z.object({
|
|
popupId: z.number(),
|
|
targetObject: z.string(),
|
|
message: z.string(),
|
|
buttons: z.array(isButtonDescriptor),
|
|
});
|
|
|
|
/**
|
|
* A message sent from the iFrame to the game to add a message in the chat.
|
|
*/
|
|
export type OpenPopupEvent = z.infer<typeof isOpenPopupEvent>;
|