Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with the new javascript module api #39

Closed
bartocc opened this issue May 22, 2017 · 5 comments
Closed

Compatibility with the new javascript module api #39

bartocc opened this issue May 22, 2017 · 5 comments
Labels
types:core Something is wrong with the Ember type definitions

Comments

@bartocc
Copy link

bartocc commented May 22, 2017

RFC: https://github.com/emberjs/rfcs/blob/master/text/0176-javascript-module-api.md

import Component from '@ember/component';

generates an error : [ts] Cannot find module '@ember/component'.

This import is possible thanks to ember-cli/ember-cli-shims#92 available in https://github.com/ember-cli/ember-cli-shims/releases/tag/v1.2.0-beta.2.

How can we make typescript aware of those new modules ?

@chriskrycho
Copy link
Member

@bartocc I believe what we'll need to do is update the typings in the Definitely Typed repo for that. We'll need to come up with a strategy for defining the imports at both locations in some way or another, given that we're certain to have some users on the old and some on the new import paths. 🤔

@bartocc
Copy link
Author

bartocc commented Jun 7, 2017

@chriskrycho that's roughly what I thought. But I am not familiar with the Definitely Typed repo and the way @types/ember is generated. Do you know who might know more about this ?

@chriskrycho
Copy link
Member

Unfortunately, it's generated by hand. It's a matter of forking the repo and then updating this file. I started on some tweaks a few weeks ago (before I went on vacation) but ran into a number of issues there around extracting the RSVP bits to reference the dedicated RSVP typings. My goal is to get that done first, then put together the plan for updating the typings in general. I need to work through and identify what needs to be done and then I'll try to write up an issue in terms of things people can tackle.

@chriskrycho chriskrycho added the types:core Something is wrong with the Ember type definitions label Jul 26, 2017
@chriskrycho
Copy link
Member

Work on this has started and I'll add updates here early next week with links to the places where it's in work so people can help.

@chriskrycho
Copy link
Member

Watch for a PR at https://github.com/typed-ember/ember-typings/pulls adding these in the next few days. The work is done, just need to land a few other pieces first!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types:core Something is wrong with the Ember type definitions
Projects
None yet
Development

No branches or pull requests

2 participants