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
Add ability to generate ambient declarations for external commonjs modules #1236
The dts-bundle package (an admitted kludge) is the only way I was able to find to make commonjs modules resusable across projects. It was painful enough that I just switched to internal modules and shoved all the dependency management into my build script. Would be awesome to have commonjs modules "just work".
Basarat Ali Syed (@basarat) can you show how this can be done? I want to do the very thing the error is saying cannot be done. What is the alternative?
'Import or export declaration in an ambient module declaration cannot reference module through relative module name.'
Activity
basarat commentedon Nov 21, 2014
current workaround : https://github.com/TypeStrong/dts-bundle and https://github.com/TypeStrong/grunt-dts-bundle
tlong-dev commentedon Nov 22, 2014
This is related to, if not a duplicate of #575
Also I completely agree with emphasis. This is by far the biggest road block when trying to make use of Typescript within our organization.
sccolbert commentedon Nov 24, 2014
Absolutely 👍
The dts-bundle package (an admitted kludge) is the only way I was able to find to make commonjs modules resusable across projects. It was painful enough that I just switched to internal modules and shoved all the dependency management into my build script. Would be awesome to have commonjs modules "just work".
KeithWoods commentedon Dec 2, 2014
I believe this is a duplicate of, or very related to #17
We're using dts-bundle to get around this, it'd be great to have compiler support.
niemyjski commentedon Apr 22, 2015
+1. We really really really need this.
OvidiuGuta commentedon Jul 28, 2015
+1. It would be really useful.
vvakame commentedon Jul 28, 2015
👍
We need tsc allow below syntax.
but, now we got below error message.
mribichich commentedon Jan 12, 2016
+1
basarat commentedon Mar 1, 2016
Now that the compiler supports node module resolution this can be closed as far as I am concerned 🌹
RyanCavanaugh commentedon Mar 1, 2016
If Basarat Ali Syed (@basarat) says it's good it's good with me too 😃
ca0v commentedon Dec 20, 2016
Basarat Ali Syed (@basarat) can you show how this can be done? I want to do the very thing the error is saying cannot be done. What is the alternative?
'Import or export declaration in an ambient module declaration cannot reference module through relative module name.'
MemnochDaCoder commentedon Feb 22, 2018
+1