RocketChat / RocketChat/Rocket.Chat

chore: fix unsafe type assertions in useEmojiOne

Open
#39,154 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: feature
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

useEmojiOne.ts contains two unsafe as any type assertions that bypass TypeScript's type checking.

File: apps/meteor/client/views/root/hooks/useEmojiOne.ts — Lines 14, 18

These assertions should be replaced with proper type-safe alternatives to improve code quality and type safety.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with apps/meteor/client/views/root/hooks/useEmojiOne.ts, focusing on the two as any assertions at lines 14 and 18. Inspect the surrounding types and usages to determine type-safe replacements. Done means both assertions are removed without changing the hook's behavior and TypeScript type checking passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.