Skip to content

Add explicit return type annotation to cn function - #411

Draft
Lang-Qiu wants to merge 1 commit into
saltbo:mainfrom
Lang-Qiu:auto-pr/type_annotations-1780792064
Draft

Add explicit return type annotation to cn function#411
Lang-Qiu wants to merge 1 commit into
saltbo:mainfrom
Lang-Qiu:auto-pr/type_annotations-1780792064

Conversation

@Lang-Qiu

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

Copy link
Copy Markdown

Background

The cn function in src/lib/utils.ts lacked an explicit return type annotation. Although TypeScript can infer the type, adding an explicit annotation improves code readability and maintainability, which aligns with TypeScript best practices for type safety and documentation.

Changes

  • Added explicit return type : string to the cn function definition in src/lib/utils.ts.

Verification

  • Run the TypeScript compiler (tsc) to ensure no compilation errors.
  • Verify existing tests pass to confirm no functional changes, as this is a type-only update that preserves behavior.

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