You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior: Declaration conflict on test.ts (imported Foo vs exported Foo).
Actual behavior: No error. Instead, (see last line) Foo refers to the imported Foo, and the exported Foo becomes unaccessible. Is this expected?
If export interface is changed to export class, then a declaration conflict appears.
If export is removed in initial case, a declaration conflict also appears.
Playground Link: I don't know how to reproduce this with one file.
Related Issues: I searched issues, stackoverflow and docs (declaration merging, imports and exports, namespaces) but couldn't find any references to this behaviour.
The text was updated successfully, but these errors were encountered:
Raised a PR to attempt resolving this (#31231). One thing to note is that this was introduced by #7591 because of possible breakage from #7583. Not sure if this still holds though.
TypeScript Version: 3.5.0-dev.20190419
Search Terms: import export conflict priority
Code
Expected behavior: Declaration conflict on
test.ts
(imported Foo vs exported Foo).Actual behavior: No error. Instead, (see last line)
Foo
refers to the imported Foo, and the exported Foo becomes unaccessible. Is this expected?If
export interface
is changed toexport class
, then a declaration conflict appears.If
export
is removed in initial case, a declaration conflict also appears.Playground Link: I don't know how to reproduce this with one file.
Related Issues: I searched issues, stackoverflow and docs (declaration merging, imports and exports, namespaces) but couldn't find any references to this behaviour.
The text was updated successfully, but these errors were encountered: