hyperweb-io / hyperweb-io/ts-codegen
Pedantic eslint complaints
- Vorherrschende Sprache
- TypeScript
- Sterne
- 126
- Forks
- 31
- Ø Merge
- 19 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
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`
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- eslint, typescript
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100