Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions guides/release/typescript/additional-resources/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ These are all fallbacks, of course, you should use the types supplied directly w

At the root of your application or addon, we include a `types/<your project>` directory with an `index.d.ts` file in it. Anything which is part of your project but which must be declared globally can go in this file. For example, if you have data attached to the `Window` object when the page is loaded (for bootstrapping or whatever other reason), this is a good place to declare it.

We automatically configure `index.d.ts` to be ready for [Glint][], which will make type checking work with Ember's templates. The default configuration only supports Ember's classic pairing of separate `.ts` and `.hbs` files, but Glint also supports the `<template>` format with `.gts` files. See the [corresponding package README][glint-environment-ember-template-imports] for more details. (Once Ember enables `<template>` by default, so will our Glint configuration!)
We automatically configure `index.d.ts` to be ready for [Glint][], which makes type checking work with Ember's templates. Glint targets template-tag (`.gts` / `.gjs`) authoring, where templates are tied to a backing module via import resolution.

### Environment configuration typings

Expand Down Expand Up @@ -83,7 +83,6 @@ You can enable TypeScript's current strictest configuration by including the `@t
[assertion-function]: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions
[debug-assert]: https://api.emberjs.com/ember/release/functions/@ember%2Fdebug/assert
[DefinitelyTyped]: https://github.com/DefinitelyTyped/DefinitelyTyped
[glint-environment-ember-template-imports]: https://github.com/typed-ember/glint/tree/main/packages/environment-ember-template-imports#readme
[glint]: https://typed-ember.gitbook.io/glint
[tsconfig-paths]: https://www.typescriptlang.org/tsconfig#paths
[type-narrowing]: https://www.typescriptlang.org/docs/handbook/2/narrowing.html
12 changes: 6 additions & 6 deletions guides/release/typescript/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ In addition to the usual packages added with `ember new`, the following packages
- `@types/qunit` - TypeScript type definitions for QUnit.
- `@types/rsvp` - TypeScript type definitions for RSVP.
- `@warp-drive/core-types` - shared core types, type utilities and constants for the WarpDrive and EmberData packages.

<!--
TODO: Uncomment this line when we add Glint docs
- `@glint/*` – a set of packages to support type-checking in templates.
-->
- `@glint/ember-tsc`, `@glint/template`, and `@glint/tsserver-plugin` – [Glint][glint], the template-aware type-checker. `ember-tsc --noEmit` is wired to the `lint:types` script; the `@glint/tsserver-plugin` package augments the TypeScript Server in your editor with template-aware diagnostics.

<div class="cta">
<div class="cta-note">
Expand All @@ -52,7 +48,7 @@ In addition to the usual files added with `ember new`, we also add:

Additionally:

- `package.json` will have a `lint:types` script to check types with the command line.
- `package.json` will have a `lint:types` script (`ember-tsc --noEmit`) to check both TypeScript and templates with the command line.
- `ember-cli-build.js` will be configured to transform TypeScript at build-time.
- `.ember-cli` has `isTypeScriptProject` set to true, which will force the blueprint generators to generate TypeScript rather than JavaScript by default.
- `.eslintrc.js` will be configured for TypeScript.
Expand All @@ -70,3 +66,7 @@ To convert an existing app to TypeScript, you'll need to make the changes descri
[tsconfig]: ../application-development/configuration/#toc_tsconfigjson

<!-- External links -->

[glint]: https://typed-ember.gitbook.io/glint/

<!-- External links -->
Loading