hyperweb-io / hyperweb-io/ts-codegen

Bug on interface `Omit<...>` generation

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

説明

Here's a small example on v4 that happens when generating the queries:

Current:
```typescript
export interface FactoryReactQuery {
client: FactoryQueryClient | undefined;
options?: Omit, "'queryKey' | 'queryFn' | 'initialData'"> & {
initialData?: undefined;
};
}
```

Expected:
```typescript
options?: Omit, "queryKey" | "queryFn" | "initialData"> & {
```

The omit syntax is incorrect because it is treating `"'queryKey' | 'queryFn' | 'initialData'"` as a single property.

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

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

調査の方向性

Reproduce the v4 query generation with the TypeScript example in the issue, then trace the generator entry point that emits the FactoryReactQuery options type. Compare the generated Omit expression with the expected output; done means each omitted property is emitted as a separate quoted union member.

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

評価

技術スタック
typescript
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
55/100

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

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