quick-lint / quick-lint-js

quick-lint-js finds bugs in JavaScript programs
https://quick-lint-js.com
GNU General Public License v3.0
1.55k stars 192 forks source link

re-exporting type under the same name in declare global shows error #1173

Open KraXen72 opened 10 months ago

KraXen72 commented 10 months ago

image

i can rename it like i did with the _VtourInfoDB, but it's a hassle

strager commented 10 months ago

I am trying to replicate your issue. The following code causes TypeScript's compiler to complain about the cyclic definition:

export type Banana = {};
declare global {
    type Banana = Banana;
}

TypeScript playground

Can you share a complete example where TypeScript's compiler does not complain (but quick-lint-js does complain)?

KraXen72 commented 10 months ago

i'll see if i can make a minimal working repro in a bit.