Skip to content

fix: type-safe config parseEnv return types#22530

Merged
spalladino merged 1 commit intomerge-train/spartanfrom
claudebox/fix-type-safe-config-ci
Apr 14, 2026
Merged

fix: type-safe config parseEnv return types#22530
spalladino merged 1 commit intomerge-train/spartanfrom
claudebox/fix-type-safe-config-ci

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

Summary

Fixes two TypeScript type errors introduced by PR #22445 (refactor: type-safe config).

ConfigMappingsType<T> uses Required<T>[K] to derive the parseEnv return type, so for optional number fields, parseEnv must return number — not number | undefined. The undefined case for missing env vars is already handled by the config framework before parseEnv is called.

  • stdlib/src/config/sequencer-config.ts: attestationPropagationTime.parseEnv now returns number instead of number | undefined
  • p2p/src/config.ts: l1PublishingTime.parseEnv now returns number instead of number | undefined

ClaudeBox log: https://claudebox.work/s/1b406eba6bceb29c?run=1

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Apr 14, 2026
@spalladino spalladino marked this pull request as ready for review April 14, 2026 15:35
@AztecBot AztecBot force-pushed the claudebox/fix-type-safe-config-ci branch from 158c9d2 to df23f26 Compare April 14, 2026 15:37
@spalladino spalladino enabled auto-merge (squash) April 14, 2026 15:37
@spalladino spalladino disabled auto-merge April 14, 2026 15:41
@spalladino spalladino merged commit cec40d9 into merge-train/spartan Apr 14, 2026
8 of 9 checks passed
@spalladino spalladino deleted the claudebox/fix-type-safe-config-ci branch April 14, 2026 15:41
github-merge-queue bot pushed a commit that referenced this pull request Apr 15, 2026
BEGIN_COMMIT_OVERRIDE
fix(p2p): replace non-null assertions on blockStream with explicit
checks (#22499)
refactor: type-safe config (#22445)
fix: type-safe config parseEnv return types (#22530)
refactor: unify branding pattern across codebase (#22516)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants