hyperweb-io / hyperweb-io/ts-codegen
Pedantic eslint complaints
- Langage dominant
- TypeScript
- Étoiles
- 126
- Forks
- 31
- Merge moyen
- 19 min
- PR mergées (30 j)
- 2
Description
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`
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- eslint, typescript
- Domaine
- tooling
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100