Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad behaviour when the same import is used in two namespaces #130

Closed
jtassin opened this issue Dec 9, 2020 · 1 comment
Closed

Bad behaviour when the same import is used in two namespaces #130

jtassin opened this issue Dec 9, 2020 · 1 comment

Comments

@jtassin
Copy link
Contributor

jtassin commented Dec 9, 2020

  • Version:
  • Rollup Version: 2.33

Reproduction

I made a PR with a test that reproduce the bug.
#128

Here is a sump up of the reproduction case

index.ts

export * as Foo from "./foo";
export * as Bar from "./bar";

foo.ts

import { Subscribable } from 'ava';

export interface Foo extends Subscribable {
  a: number
}

bar.ts

import { Subscribable } from 'ava';

export interface Bar extends Subscribable {
  b: number;
} 

Expected Behavior

import { Subscribable } from "ava";

declare namespace Foo {
  interface Foo extends Subscribable {
	a: number;
   }
}

declare namespace Bar {
  interface Bar extends Subscribable {
	b: number;
  }
}

export { Foo, Bar };

Actual Behavior

the import is inside the namespace

declare namespace Foo {
  import { Subscribable } from "ava";
  interface Foo extends Subscribable {
	a: number;
   }
}

declare namespace Bar {
  interface Bar extends Subscribable {
	b: number;
  }
}

export { Foo, Bar };
@wessberg
Copy link
Owner

Hi there,
Sorry for the late response.

This problem has been fixed as part of deec007. A new version will be released on NPM shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants