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
We are using AMD modules in our JavaScript application. Application code base is growing and we have made a decision to move to TS for more type safety recently.
Problem
Consuming AMD modules written in JavaScript is too cumbersome. /// <amd-dependency path="x" /> works for expressing the dependency, but in order to consume the dependecy from TS requires all kinds of trickery, which should not be the case for a common case of using TS and JS interchangeably.
Solution
Introduce name parameter to amd-dependecy comment. /// <amd-dependency path="x" name="variableName" />
With this simple enhancement we can write much cleaner TS code:
We are using AMD modules in our JavaScript application. Application code base is growing and we have made a decision to move to TS for more type safety recently.
Problem
Consuming AMD modules written in JavaScript is too cumbersome.
/// <amd-dependency path="x" />
works for expressing the dependency, but in order to consume the dependecy from TS requires all kinds of trickery, which should not be the case for a common case of using TS and JS interchangeably.Solution
Introduce name parameter to amd-dependecy comment.
/// <amd-dependency path="x" name="variableName" />
With this simple enhancement we can write much cleaner TS code:
Generated JS code:
Extra benefits
The text was updated successfully, but these errors were encountered: