Bug Fix: TypeScript migration for helpers.ts
Los mantenedores suelen responder en 1 día
@Rohit3523 ya está trabajando en esto.
Desde el 13/11/2025.
- #6796 de @DSingh0304 — cerrado sin fusionar
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript
Línea de trabajo
Comienza con app/lib/methods/helpers/helpers.ts e inspecciona las funciones auxiliares indicadas; después, lee sus usos en app/lib/hooks/useUserData.ts y app/containers/MessageComposer/components/ComposerInput.tsx para determinar los tipos necesarios. Ejecuta yarn lint y el compilador de TypeScript mientras eliminas @ts-nocheck y añades anotaciones de parámetros y valores de retorno; se considera terminado cuando el archivo se comprueba por completo sin nuevos errores de tipos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the Bug
The file app/lib/methods/helpers/helpers.ts has @ts-nocheck at the top, which disables TypeScript checking for the entire file. All 8 exported functions lack proper TypeScript type annotations, reducing type safety and developer experience.
Steps to Reproduce
- Open
app/lib/methods/helpers/helpers.ts - Observe
@ts-nocheck - TEMPcomment at line 1 - Notice all function parameters lack type annotations (e.g.,
room,sender,itemare untyped) - Run
yarn lintor TypeScript compiler - no type errors are reported for this file despite missing types
Expected Behavior
- Remove
@ts-nocheckdirective - Add proper TypeScript types to all function parameters and return types
- All functions should have complete type annotations
- TypeScript compiler should properly check this file
Actual Behavior
- TypeScript checking is disabled for the entire file
- No type safety for 8 exported functions
- Potential runtime errors that could be caught at compile time
- Poor IDE autocomplete and IntelliSense support
Rocket.Chat Server Version
N/A (Code quality issue, not server-dependent)
Rocket.Chat App Version
4.67.0
Device Name
N/A (Code quality issue, not device-specific)
OS Version
N/A (Code quality issue, not OS-specific)
Additional Context
File: app/lib/methods/helpers/helpers.ts
Functions to migrate:
isGroupChat(room)getRoomAvatar(room)getUidDirectMessage(room)getRoomTitle(room)getSenderName(sender)canAutoTranslate()isRead(item)hasRole(role)hasPermission(permissions, rid?)
Impact: This file is used in multiple places:
app/lib/hooks/useUserData.tsapp/containers/MessageComposer/components/ComposerInput.tsx- And potentially other files
Related: Part of TypeScript migration effort to improve code quality and maintainability.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.4k
- Forks
- 1.5k
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 29
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de RocketChat/Rocket.Chat.ReactNative
-
[IMPROVEMENT] Remove redundant `await` on synchronous `userPreferences.getBool` in `getUsersPresence`Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertotype: feature
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
RocketChat/Rocket.Chat.ReactNative#7737 ·
Los mantenedores suelen responder en 1 día
-
UIKit modal: a viewSubmit response with no `type` field fails to close the modal on mobile (regression from #7057)Posiblemente ocupada @erikurt9 la tomó hace 106 días. Abiertotype: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
RocketChat/Rocket.Chat.ReactNative#7503 · 3 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
type: bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
RocketChat/Rocket.Chat.ReactNative#7437 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
✅ tests 👷 ci type: feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
RocketChat/Rocket.Chat.ReactNative#7247 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug: goRoom navigates to broken RoomView after failed DM creation from searchPosiblemente ocupada @deepak0x la tomó hace 216 días. Abiertotype: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
RocketChat/Rocket.Chat.ReactNative#7098 ·
Los mantenedores suelen responder en 1 día
Todos los issues de RocketChat/Rocket.Chat.ReactNative
Issues similares
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hexPosiblemente ocupada @bardrop la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
-
`/leaderboard`, the page and the share image say "be the first" for a program that hasn't startedAbiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
codercops/discord-bot#152 ·
Los mantenedores suelen responder en 1 día
-
bug i18n
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
endora-commerce/endora-commerce#1315 ·
Los mantenedores suelen responder en 1 día
-
Two stored artist rows are not act names: "DJS" from a Renate floor heading and "Stevie Cox -"Abiertoarea:data-quality importer size:S
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
enorm-labs/event-junkie#5136 ·
Los mantenedores suelen responder en 1 día
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día