spaxel/dashboard/package.json
jedarden 7e0bf66ddd fix(bf-56uk): make blob-identity TypeScript verification compile-clean
Add the TypeScript tooling and compile-time check that verifies the blob
identity fields (personName/assignedColor/identityResolved + deprecated
aliases) declared on the Blob interface are TypeScript-compliant:

  - dashboard/tsconfig.json: strict tsc config, noEmit, includes types/**
  - dashboard/package.json: add `typescript` devDep and `npm run typecheck`
  - dashboard/types/blob-identity.check.ts: pure compile-time assertions

The check file is the TypeScript mirror of the Go identity-field
serialization suites (bf-5151/bf-2ibc/bf-5v3q/bf-3wkz/bf-4qto): a zero-value
blob (no identity set), a resolved-identity blob (camelCase keys the Go
dashboard projection emits), and the identityResolved tri-state must all
satisfy the Blob interface with no missing-field or type-mismatch errors.

Fix the one compilation error the check surfaced: the HasField helper used
`NonNullable<T[K]> extends NonNullable<V>`, which TypeScript does not
reliably evaluate for an indexed type parameter inside a nested conditional —
it produced a spurious TS2344 `false` for the optional `boolean`
identityResolved field. Rewrite it as `V extends T[K]` (concrete V on the
left, indexed T[K] on the right), which resolves correctly in every case and
still catches missing keys and type mismatches.

Verified: `npm run typecheck` exits 0; `go vet`/`go build`/`go test ./...`
on mothership all pass (no Go touched).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-06 19:32:31 -04:00

17 lines
410 B
JSON

{
"name": "spaxel-dashboard",
"private": true,
"scripts": {
"test": "jest --verbose",
"test:a11y": "playwright test",
"typecheck": "tsc --noEmit -p tsconfig.json"
},
"devDependencies": {
"@axe-core/playwright": "^4.10.1",
"@playwright/test": "^1.52.0",
"http-server": "^14.1.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"typescript": "^6.0.3"
}
}