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
Compilation throws error "TS2307: Cannot find module ". Then running the generated .js (on node) works as expected. Module is resolved (through require()) and produces expected output.
Custom typings are in place. Visual Studio Code actually recognizes the typings. However, compilation fails.
Usage error? Is this a mis-understanding or a tsc bug?
create namespaces named foo and bar respectively. But we couldn't remove the declare module bar syntax because it was a breaking change, so now it just continues to confuse users.
Activity
DanielRosenwasser commentedon Aug 21, 2016
You want to write
declare module "halfred"(notice the quotes, which implies an import path).DanielRosenwasser commentedon Aug 21, 2016
As a heads up, I opened up this bug for you: #10464
The TL;DR is that
This
declares a module that you can import as
"foo".While these
create namespaces named
fooandbarrespectively. But we couldn't remove thedeclare module barsyntax because it was a breaking change, so now it just continues to confuse users.dherges commentedon Aug 21, 2016
Thanks a lot for your help! 👍
DanielRosenwasser commentedon Aug 21, 2016
You're welcome!