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
{{ message }}
Repository navigation
version 1.1.0.0: misleading error for incorrectly referenced interface #722
I just installed the 1.1.0.0 tsc compiler, and found a misleading error message, in which the compiler indicates that an existing symbol doesn't exist.
I work with external modules, so this minimal example has two files:
The error is technically correct (the worst kind of correct for an error message) -- when you have a dotted identifier in a type position (Envelope.IEnvelope), the things to the left of the final dot are known to be "namespace" identifiers. There isn't a namespace named Envelope in scope, only values and types.
A possible improvement on our side is to either tell you that we found some non-namespace thing called Envelope, or to be more clear and say "Cannot find namespace 'Envelope'" to give you some better clue as to what's going on.
Thanks for the explanation.
The second option seems clearer to me: "Cannot find namespace 'Envelope'".
The first is less clear to me, perhaps because I think of a class as a type of namespace.
Activity
RyanCavanaugh commentedon Sep 22, 2014
The error is technically correct (the worst kind of correct for an error message) -- when you have a dotted identifier in a type position (
Envelope.IEnvelope), the things to the left of the final dot are known to be "namespace" identifiers. There isn't a namespace namedEnvelopein scope, only values and types.A possible improvement on our side is to either tell you that we found some non-namespace thing called
Envelope, or to be more clear and say "Cannot find namespace 'Envelope'" to give you some better clue as to what's going on.psnider commentedon Sep 22, 2014
Thanks for the explanation.
The second option seems clearer to me: "Cannot find namespace 'Envelope'".
The first is less clear to me, perhaps because I think of a class as a type of namespace.
DanielRosenwasser commentedon Apr 21, 2015
Can we mark this as "Accepting PRs"?
Also, #102 is almost the dual of this issue; perhaps any changes that address this should address that as well.
RyanCavanaugh commentedon Apr 27, 2015
Mistagged
niemyjski commentedon Apr 28, 2015
+1
mhegazy commentedon May 6, 2015
fixed in ee4a15c. thanks Masahiro Wakame (@vvakame)!