Skip to content

safeParseAssetSourceSpec

safeParseAssetSourceSpec(input): ZodSafeParseResult<{ assetRoot: string; assets: ({ biome: string; edgeMask?: number; format: "png" | "glb" | "gltf"; id: string; path: string; role: "tile"; } | { biome?: string; format: "png"; grid: { cellHeight: number; cellWidth: number; cols: number; rows: number; }; id: string; path: string; role: "tileset"; transition?: { edgeCells: Record<string, number>; }; } | { category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "png"; id: string; path: string; role: "sprite"; } | { category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "glb" | "gltf"; id: string; path: string; role: "model"; })[]; name: string; specVersion: 1; }>

Defined in: packages/declarative-hex-worlds/src/asset-source/spec.ts:163

Non-throwing parse — returns Zod’s { success, data | error } result.

unknown

ZodSafeParseResult<{ assetRoot: string; assets: ({ biome: string; edgeMask?: number; format: "png" | "glb" | "gltf"; id: string; path: string; role: "tile"; } | { biome?: string; format: "png"; grid: { cellHeight: number; cellWidth: number; cols: number; rows: number; }; id: string; path: string; role: "tileset"; transition?: { edgeCells: Record<string, number>; }; } | { category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "png"; id: string; path: string; role: "sprite"; } | { category?: "unit" | "prop" | "structure" | "npc" | "enemy" | "pc" | "encounter"; format: "glb" | "gltf"; id: string; path: string; role: "model"; })[]; name: string; specVersion: 1; }>