Skip to content

chore: remove type assertion #3800

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

chore: remove type assertion #3800

wants to merge 2 commits into from

Conversation

ayoung19
Copy link

@ayoung19 ayoung19 commented Jun 16, 2025

Description πŸ“£

Was just browsing through the code and noticed some as usages in queue-service.ts I thought I could help clean up.

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

Tests πŸ› οΈ

Ran unit tests. Didn't run e2e tests since this PR doesn't affect code logic.


Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Improves type safety in backend/src/queue/queue-service.ts by removing TypeScript type assertions (as operator) in favor of properly typed declarations.

  • Replaces type-asserted empty objects with properly typed Partial<Record> for queueContainer, queueContainerPg, and workerContainer
  • Adds explicit null checks before accessing containers to prevent runtime errors
  • Changes improve code reliability by catching potential type-related issues at compile time rather than runtime

1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile

@maidul98
Copy link
Collaborator

πŸŽ‰ Snyk checks have passed. No issues have been found so far.

βœ… security/snyk check is complete. No issues have been found. (View Details)

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