Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 4x 4x 4x 4x | import type { PublicSurfaceData } from '../../../types'; export function validateSurface(surfaceData: PublicSurfaceData): void { Iif (!surfaceData.id) { throw new Error('Surface must have an id'); } Iif (surfaceData.points?.length === 0) { throw new Error('Surface must have non-empty points array'); } Iif (surfaceData.polys?.length === 0) { throw new Error('Surface must have non-empty polys array'); } Iif (!surfaceData.frameOfReferenceUID) { throw new Error('Surface must have a frameOfReferenceUID'); } } |