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
I think this is an atom-typescript error as I've tried compiling this from typescript@next directly, and it seems to compile fine.
The error relates to enums, and exports using the new typescript node resolution (with the typings property in the package.json).
The bug can be reproduced through the following scenario: (Sadly I can't attach a .zip, so ask me if you want the contents directly for easy import and analysis):
Three projects: a, b, c.
b depends on a c depends on b
a exports an enum through its index.ts:
exportenumE{}
b then exports a function that returns E through its index.ts:
import{E}from'a'exportfunctionf():E{returnnull}
c then consumes f through its index.ts:
import{E}from'a'import{f}from'b'lete:E=f()
There is now an error for e:
Type 'E' is not assignable to type 'E'.
All three packages have a package.json that looks like this:
Now, what's especially interesting, is if you have the rootDir and outDir the same, then the error doesn't occur.
Furthermore, this defect occurs if f were to export another symbol (e.g. an interface) which references an exported enum somewhere within it's structure or hierarchy (which was how I encountered this bug, and it took me some time to track it down to this specific scenario)
This only seems to affect enums, not other types.
The text was updated successfully, but these errors were encountered:
Hey,
I think this is an atom-typescript error as I've tried compiling this from typescript@next directly, and it seems to compile fine.
The error relates to enums, and exports using the new typescript node resolution (with the typings property in the package.json).
The bug can be reproduced through the following scenario: (Sadly I can't attach a .zip, so ask me if you want the contents directly for easy import and analysis):
Three projects:
a
,b
,c
.b
depends ona
c
depends onb
a
exports an enum through its index.ts:b
then exports a function that returnsE
through its index.ts:c
then consumesf
through its index.ts:There is now an error for
e
:All three packages have a package.json that looks like this:
And a tsconfig.json that looks like:
Now, what's especially interesting, is if you have the rootDir and outDir the same, then the error doesn't occur.
Furthermore, this defect occurs if
f
were to export another symbol (e.g. an interface) which references an exported enum somewhere within it's structure or hierarchy (which was how I encountered this bug, and it took me some time to track it down to this specific scenario)This only seems to affect enums, not other types.
The text was updated successfully, but these errors were encountered: