microsoft/typescript-go

Duplicate identifier error in type with computed property names

Closed this issue · 1 comments

Steps to reproduce

type X = {
    ["A"]: string
    ["A"]: string
}

Playground Link

Behavior with typescript@5.8

No error in tsc

Behavior with tsgo

Error with duplicate identifier error. Arguably this is the correct behavior, but it's still a difference between the two.

This is an intended difference. Effectively a bug in the old compiler.