oxc-project / oxc

⚓ A collection of JavaScript tools written in Rust.
https://oxc.rs
MIT License
10.65k stars 391 forks source link

bug(semantic): type annotations on accessor properties not counted as a reference #5177

Closed DonIsaac closed 3 weeks ago

DonIsaac commented 3 weeks ago

Part of #5129

Given this code:

type Foo = 'foo' | 'bar'
export class Bang {
    accessor x: Foo
}

There should be a single reference with ReferenceFlags::Type on Foo, but none exist. image

DonIsaac commented 3 weeks ago

Note: this appears to be a bug in the parser, since this AccessorProperty has no type annotation field. image