hyperweb-io / hyperweb-io/ts-codegen

Pedantic eslint complaints

Open
#69 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
126
Forks
31
Avg merge
19m
Merged PRs (30d)
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`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.