wessberg / rollup-plugin-ts

A TypeScript Rollup plugin that bundles declarations, respects Browserslists, and enables seamless integration with transpilers such as babel and swc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Two different `typeof x` are treated as the same (where `x` is a different variable in each)

RebeccaStevens opened this issue · comments

  • Version: 3.4.5
  • Rollup Version: 4.18.0
  • Does it work with tsc (if applicable): Yes

Reproduction

https://github.com/RebeccaStevens/rollup-plugin-ts-issue-226

Expected Behavior

type Foo = {
    bar: typeof bar;
};
declare function bar(baz: string): string;
type Foo$0 = {
    bar: typeof bar$0;
};
declare function bar$0(baz: string, qux: string): string;
export { Foo as AFoo, Foo$0 as BFoo };

Actual Behavior

type Foo = {
    bar: typeof bar;
};
declare function bar(baz: string): string;
type Foo$0 = {
    bar: typeof bar;
};
export { Foo as AFoo, Foo$0 as BFoo };