-
Notifications
You must be signed in to change notification settings - Fork 99
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
Bring apps closer to typechecking out of the box #1169
Conversation
@@ -146,8 +146,8 @@ module.exports = { | |||
{ name: 'ember-cli-typescript-blueprints', target: 'latest' }, | |||
{ name: 'typescript', target: 'latest' }, | |||
{ name: '@types/ember', target: 'latest' }, | |||
{ name: '@types/rsvp', target: 'latest' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@types/ember
already brings in @types/rsvp
, and having one fewer explicit version constraint floating around makes "cannot re-declare block scoped variables" less likely to crop up as folks update various dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💕 ship it!
Today, if I run
ember new my-app
and then immediately follow that withember install ember-cli-typescript
, I can almost renameapp.js
,router.js
andtest-helper.js
to end in.ts
and have a typechecking application out of the box. There are still just a couple of blockers for that:app.js
importsember-resolver
but we don't install the@types
package for that by defaulttest-helper.js
referencesconfig.APP
, which isn't part of the declarations we emit forconfig/environment
test-helper.js
includes relative imports forapp
andconfig/environment
that work at runtime but don't match the on-disk layout, so TS rejects the importThis PR aims to fix those first two bullets, and I have an ember-cli PR open to address the third.