TypeScript gate
Prevents “done” when the repo still has type errors.
#!/usr/bin/env bash
set -euo pipefail
PAYLOAD=$(cat /dev/stdin)
IS_ACTIVE=$(echo "$PAYLOAD" | jq -r '.stop_hook_active // false' 2>/dev/null || echo false)
[ "$IS_ACTIVE" = "true" ] && exit 0
npx tsc --noEmit || exit 2