hyperweb-io / hyperweb-io/ts-codegen

Pedantic eslint complaints

Abierto
#69 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
126
Forks
31
Merge medio
19 min
PR fusionados (30 d)
2

Descripción

Got some messages from eslint. Maybe you can adjust for the empty objects we love in Rust.

Code:

```ts
export type ExecuteMsg =
| {
bond: {};
}
| ...
```

Error message:

```
19:11 error Don't use `{}` as a type. `{}` actually means "any non-nullish value".
- If you want a type meaning "any object", you probably want `Record` instead.
- If you want a type meaning "any value", you probably want `unknown` instead.
- If you want a type meaning "empty object", you probably want `Record` instead @typescript-eslint/ban-types
```

I just manually updated mine to `Record`

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Start by locating the TypeScript code-generation path that emits the ExecuteMsg empty-object variants and run the relevant lint checks. Replace generated empty-object types with the intended empty-object representation, then confirm the generated output no longer triggers @typescript-eslint/ban-types.

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

Evaluación

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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.