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

commonjs/ES6 interop #4

@unional

Description

@unional

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions