Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Binding element 'signal' implicitly has an 'any' type

Abierto
#112 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
typescript
Área
tooling

Línea de trabajo

Start by running the TypeScript build that reports the error and inspect src/generated/user/userComponents.ts around line 993. Trace how this generated file is produced to find the relevant generator entry point, then verify that the generated callback no longer triggers TS7031 under the repository's TypeScript configuration.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

waiting response

In the generated code for components, I'm running into a problem due to our TypeScript configuration disallowing implicit any.

The error I get when running tsc as part of our build process:

src/generated/user/userComponents.ts:993:8 - error TS7031: Binding element 'signal' implicitly has an 'any' type.

993     ({ signal }) => fetchGetCurrentUser({ ...fetcherOptions, ...variables }, signal),

It looks like this single line could be fixed by setting a type on the signal property like:

({ signal }: { signal?: AbortSignal }) =>
      fetchGetCurrentUser({ ...fetcherOptions, ...variables }, signal),

Either that or defining a type like type SignalOption = { signal?: AbortSignal } and using that there.

Maybe there's a better way to do it to have the compiler infer the type for signal.

It would be nice to have the type explicitly defined to avoid this problem.

Lenguaje dominante
TypeScript
Estrellas
634
Forks
83
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de fabien0102/openapi-codegen

Todos los issues de fabien0102/openapi-codegen

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.