Skip to content

fix(webhooks): satisfy exactOptionalPropertyTypes on WEBHOOK_QUEUE + test typing - #552

Merged
bytemain merged 1 commit into
mainfrom
volta/webhook-typecheck-fix
Sep 24, 2026
Merged

bytemain merged 1 commit into
mainfrom
volta/webhook-typecheck-fix

Conversation

@bytemain

Copy link
Copy Markdown
Member

The deploy's run_checks typecheck (with generated worker-configuration.d.ts) rejected the optional WEBHOOK_QUEUE plumbing + two test-only nits. EnqueueDeliveriesEnv.WEBHOOK_QUEUE → Queue | undefined; emitWebhookEvent/handleWebhookQueue take EnqueueDeliveriesEnv; queue-test env() casts the stand-in to Queue<unknown>; and the pre-existing .get<T>() in release_human_approval_migration.test (landed via #239 before deploy-typecheck could see it) → .get() as T | undefined. tsc --noEmit now 0 errors with worker-configuration.d.ts generated.

…test typing

The deploy's run_checks typecheck (with the generated worker-configuration.d.ts)
rejected the optional WEBHOOK_QUEUE plumbing and two test-only type nits:

- EnqueueDeliveriesEnv.WEBHOOK_QUEUE ->  (not just ), and
  emitWebhookEvent/handleWebhookQueue take EnqueueDeliveriesEnv directly so the
  optional-binding shape assigns cleanly under exactOptionalPropertyTypes.
- webhook_queue.test env() casts the sendBatch-only stand-in to Queue<unknown>
  instead of spreading a partial object.
- release_human_approval_migration.test (pre-existing, landed via #239 before
  the deploy-typecheck could see it): better-sqlite3 .get() is non-generic —
  use , the pattern sibling tests use.

tsc --noEmit now reports 0 errors with worker-configuration.d.ts generated
(deploy parity); all touched tests still pass.

Signed-off-by: Volta <volta@mail.build>
@bytemain
bytemain force-pushed the volta/webhook-typecheck-fix branch from 246f987 to 5b3623f Compare September 24, 2026 08:17
@bytemain
bytemain merged commit 260de2e into main Sep 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant