hyperweb-io / hyperweb-io/ts-codegen

Pedantic eslint complaints

Aperta
#69 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
126
Fork
31
Merge medio
19m
PR unite (30g)
2

Descrizione

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`

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.