Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: making code strongly-typed #1751

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

theanuragg
Copy link

Description

This PR replaces of any with unknown for better type safety, strongly typed code, and stricter type-checking.

Why Change any to unknown?

  • any bypasses TypeScript's type-checking, allowing unintended errors.
  • unknown enforces explicit type assertions, leading to safer code.
  • Helps maintain stricter TypeScript standards and improves maintainability.

Changes Made

  • Updated all catch (error: any) to catch (error: unknown).
  • Added necessary type assertions where needed.
  • Ensured proper error handling and logging.

type

Testing

  • Code compiles without errors.
  • Existing tests pass successfully.
  • No unexpected runtime errors were introduced.

here is the blog on why this is needed here

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