Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEATURE: Automatically include Ember's own types
- In TS, add an `import 'ember-source/types'` statement. - In JS, add a `/** @typedef {import('ember-source/types')} */ comment.
- Loading branch information
1 parent
b9bec54
commit 5b54ec3
Showing
3 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<% if (typescript) { %> | ||
// This "side-effect"-type import provides auto-complete, go-to-def, etc. for | ||
// Ember's internals throughout your application, so don't remove it! | ||
import 'ember-source/types'; | ||
<% } else { %> | ||
// This "type definition" import comment provides auto-complete, go-to-def, etc. | ||
// for Ember's internals throughout your application, so don't remove it, even | ||
// if you do not use TypeScript at all. | ||
/** | ||
@typedef {import('ember-source/types')} Types | ||
*/ | ||
<% } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters