Skip to content

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