hyperweb-io / hyperweb-io/ts-codegen

Pedantic eslint complaints

オープン
#69 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
126
フォーク
31
平均マージ
19分
マージ済み PR(30日)
2

説明

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`

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
eslint, typescript
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。