Skip to content

Add explicit type annotation to CURRENT_BUILD_KEY#384

Draft
Lang-Qiu wants to merge 1 commit into
crafter-station:mainfrom
Lang-Qiu:auto-pr/type_annotations-1780771686
Draft

Add explicit type annotation to CURRENT_BUILD_KEY#384
Lang-Qiu wants to merge 1 commit into
crafter-station:mainfrom
Lang-Qiu:auto-pr/type_annotations-1780771686

Conversation

@Lang-Qiu

@Lang-Qiu Lang-Qiu commented Jun 6, 2026

Copy link
Copy Markdown

Problem Background

In TypeScript, explicit type annotations improve code clarity and ensure robust type checking. The exported constant CURRENT_BUILD_KEY lacked an explicit type, which could lead to less predictable type inference and potentially affect maintainability.

Changes

Added the explicit type annotation string | null to CURRENT_BUILD_KEY based on its initialization expression (GENERATED_CURRENT_BUILD_KEY || null), enhancing readability and type safety without altering functionality.

Verification

  • Run the TypeScript compiler (e.g., tsc) to confirm no type errors are introduced.
  • Execute project tests to ensure no behavioral changes occur.

@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

@auto-pr-bot is attempting to deploy a commit to the Crafter Station Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown

No findings.

Reviewed src/lib/current-build.ts and nearby build-version usage/generation. The annotation is consistent with current behavior and does not introduce an obvious correctness, security, or performance risk.

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.

2 participants