Skip to content

Commit

Permalink
Clarify app/addon/v2 addon and type checking in README
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskrycho committed Dec 7, 2023
1 parent 1c92d9a commit b952c4c
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,17 @@ With every release, we output the `--typescript` output of new ember apps to thi

## How to use TypeScript without `ember-cli-typescript`?

In the [ember-cli-babel](https://github.com/emberjs/ember-cli-babel#enabling-typescript-transpilation) docs, it mention that in your `ember-cli-build.js`, you can specify:

Apps and v1 addons need to configure Babel to compile TypeScript files via the `ember-cli-babel` config, as described in the [ember-cli-babel](https://github.com/emberjs/ember-cli-babel#enabling-typescript-transpilation).

Additionally, you will need the `tsconfig.json` generated by the Ember TypeScript blueprint (see above), and then can run [`glint`](https://typed-ember.gitbook.io/glint) or `tsc` directly on the CLI. (Again, see the official docs for details!)

### Apps

```js
'ember-cli-babel': {
enableTypeScriptTransform: true,
},
```

For v1 addons, this would be specified in the node-land `index.js`:
```js
module.exports = {
name: require('package').name,
options: {
'ember-cli-babel': {
enableTypeScriptTransform: true
}
}
}
```

## What about for v2 addons?

The [V2 Addon Blueprint](https://github.com/embroider-build/addon-blueprint) does not use nor need ember-cli-typescript, nor any of its features.

Expand Down

0 comments on commit b952c4c

Please sign in to comment.