All files / web/src/arcade-games/music-matching Validator.ts

0% Statements 0/18
0% Branches 0/1
0% Functions 0/1
0% Lines 0/18

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                                     
/**
 * Server-safe validator for music matching game.
 *
 * Imports from variant-server.ts (no React/.tsx imports) to avoid
 * module resolution failures on the server (server.js / socket-server).
 */

import { createMatchingPairsValidator } from '@/lib/arcade/matching-pairs-framework/create-validator'
import type { MatchingPairsVariant } from '@/lib/arcade/matching-pairs-framework'
import type { MusicCard, MusicConfig } from './types'
import { musicVariantServer } from './variant-server'

// The validator only uses data/logic fields, not React components.
// Cast to full MatchingPairsVariant since createMatchingPairsValidator
// expects it, but never accesses the React-only fields.
export const musicMatchingValidator = createMatchingPairsValidator(
  musicVariantServer as MatchingPairsVariant<MusicCard, MusicConfig>
)