Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

commonjs/ES6 interop #4

Open
unional opened this issue Feb 6, 2016 · 2 comments
Open

commonjs/ES6 interop #4

unional opened this issue Feb 6, 2016 · 2 comments

Comments

@unional
Copy link
Member

unional commented Feb 6, 2016

This is not a feature proposal

Need to identify if this is really a problem. Original message:


That means we are missing the whole point here: It is not about the environment that the user wants to run in. It is about the environment that the definition writer expect the d.ts to run with

I write some projects in my company and expose them as pure TS files through jspm-p4. I can do that and it works fine for me is because I unify the whole module chain to run under module: system as I'm using JSPM.

For typings, since the users can run their application/module in any module mode, we are trying to compile the d.ts in that mode. But it will not work if there is a mode mismatch.

One solution is to add a directive (is that what it called?) at the top of each d.ts file to indicate the intent:

"module system"
...

or something similar so that import * as dr from 'domready' would resolve correctly according to the intent of the typed definition writer.

Don't know will that be possible because it means that tsc need to be able to run in different module for different files.

@blakeembrey
Copy link
Member

@unional Did we resolve this, especially now 1.8 is out?

@unional
Copy link
Member Author

unional commented Mar 1, 2016

I think this is still an issue, even with 1.8 is out. I should bring it up in TS itself.

@unional unional changed the title ES5/ES6 interop commonjs/ES6 interop Jun 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants