Skip to content

Add return type annotation to checkDomain function#254820

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

Add return type annotation to checkDomain function#254820
Lang-Qiu wants to merge 1 commit into
MetaMask:mainfrom
Lang-Qiu:auto-pr/type_annotations-1780775824

Conversation

@Lang-Qiu

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

Copy link
Copy Markdown

Problem Background

The public function checkDomain in src/index.ts was missing a return type annotation. In TypeScript, explicit type annotations improve code readability, maintainability, and enable better type checking during development.

Changes

  • Added the return type : boolean to the checkDomain function, as it returns a boolean value from detector.check(domain).result. This aligns with TypeScript best practices for public API functions.

Verification

The change is purely additive for type safety and does not alter the function's behavior or API. To verify:

  1. Compile the TypeScript code to ensure no type errors are introduced.
  2. Run existing tests to confirm that functionality remains unchanged.

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