microsoft / microsoft/TypeScript
TS2322 error in tsgo but not tsc
オープン
@ahejlsberg がすでに取り組んでいます。
2025年8月19日 から。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
## Steps to reproduce
With default compiler options:
```ts
enum E {
Foo,
Bar,
}
type A = { type: 'a'; e: E }
type B = { type: 'b' }
type C = A & { e: E.Bar }
function fn(v: A | B | C): A | B | C {
return { ...v, e: E.Foo }
}
```
## Behavior with `typescript@5.8`
Typechecks successfully.
## Behavior with `tsgo`
> index.ts:10:18 - error TS2322: Type 'E.Foo' is not assignable to type 'E.Bar'.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。