Badly needed for commonjs modules where you are more likely to ship JS code plus a generated .d.ts file.
From codeplex : https://typescript.codeplex.com/workitem/2080
current workaround : https://github.com/TypeStrong/dts-bundle and https://github.com/TypeStrong/grunt-dts-bundle
This is related to, if not a duplicate of https://github.com/Microsoft/TypeScript/issues/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.
Absolutely :+1:
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".
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.
+1. We really really really need this.
+1. It would be really useful.
:+1:
We need tsc allow below syntax.
$ cat index.d.ts
// hand assemble
declare module "foobar" {
export * from "./lib/main";
}
but, now we got below error message.
$ tsc --module commonjs index.d.ts
index.d.ts(3,3): error TS2439: Import or export declaration in an ambient module declaration cannot reference module through relative module name.
+1
Now that the compiler supports node module resolution this can be closed as far as I am concerned :rose:
If @basarat says it's good it's good with me too :smiley:
@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.'
+1
Most helpful comment
:+1:
We need tsc allow below syntax.
but, now we got below error message.