|
2 | 2 | title: The Ember Times - Issue No. 204
|
3 | 3 | authors:
|
4 | 4 | - jared-galanis
|
| 5 | + - chris-ng |
5 | 6 | date: 2022-09-04T00:00:00.000Z
|
6 | 7 | tags:
|
7 | 8 | - newsletter
|
8 | 9 | - '2022'
|
9 | 10 | ---
|
10 | 11 |
|
11 | 12 | 👋 Emberistas! 🐹
|
12 |
| - |
| 13 | +Announcing the Official TypeScript Types Public Preview 🔥 |
13 | 14 | Evolving Ember’s Major Version Process ⭕
|
14 | 15 | <SOME-INTRO-HERE-TO-KEEP-THEM-SUBSCRIBERS-READING>
|
15 | 16 |
|
@@ -43,15 +44,16 @@ This change enables Ember to have a predictable cadence for major versions simil
|
43 | 44 |
|
44 | 45 | ---
|
45 | 46 |
|
46 |
| -## [🐹 3. Section title in sentence case](section-url) |
| 47 | +## [Announcing the Official TypeScript Types Public Preview 🔥](https://blog.emberjs.com/announcing-official-typescript-types-public-preview/) |
47 | 48 |
|
48 |
| -<change section title emoji> |
49 |
| -<consider adding some bold to your paragraph> |
50 |
| -<add the contributor in the post in format "FirstName LastName (@githubUserName)" linked to their GitHub account> |
51 |
| -<please include link to external article/repo/etc in paragraph / body text, not just header title above> |
| 49 | +[Chris Krycho (@chriskrycho)](https://github.com/chriskrycho) wrote a [post](https://blog.emberjs.com/announcing-official-typescript-types-public-preview/) on how Ember is shipping a public preview of the official TypeScript support for the framework itself. Anyone using TypeScript with Ember 4.8.0 Beta 2 or later can opt into using these preview types by removing the corresponding `@types` packages and adding the following import in your `types/<your app>/index.d.ts` file: |
52 | 50 |
|
53 |
| -<add your name to author list, top and bottom> |
54 |
| -<add short title to "SOME-INTRO-HERE"> |
| 51 | +```js |
| 52 | +import 'ember-source/types'; |
| 53 | +import 'ember-source/types/preview'; |
| 54 | +``` |
| 55 | + |
| 56 | +Note there is a known issue when using the `@types/ember-data` packages which are not compatible with these types because they assume the presence of many of the Ember Classic types that were removed in this migration. If you are using Ember Data with TypeScript, you will need to wait for a future update. The key difference between the stable and preview types is: our stable types must be generated from Ember's own TypeScript source code, while the preview types are hand-written type definitions. All public API remains supported however there will only be minimal support for Ember Classic APIs around class definitions (see [RFC 800](https://rfcs.emberjs.com/id/0800-ts-adoption-plan/) for more details). |
55 | 57 |
|
56 | 58 | ---
|
57 | 59 |
|
@@ -141,4 +143,4 @@ That's another wrap! ✨
|
141 | 143 |
|
142 | 144 | Be kind,
|
143 | 145 |
|
144 |
| -Jared Galanis, the crowd and the Learning Team |
| 146 | +Jared Galanis, Chris Ng, the crowd and the Learning Team |
0 commit comments