Ember CLI TypeScript Integration

5.3.0 · maintenance · verified Sun Apr 19

ember-cli-typescript is an Ember CLI addon designed to integrate TypeScript into Ember applications and addons by facilitating TypeScript compilation and type checking. The package is currently in "maintenance mode" as of version 5.3.0, meaning it will no longer receive active development for new features unless critical updates are required. Its core functionality has largely been absorbed into `ember-cli-babel` for TypeScript transpilation and official Ember blueprints for `tsconfig.json` generation. Developers are now encouraged to configure TypeScript directly via `ember-cli-babel` options and `@tsconfig/ember` base configurations, aligning with the official Ember TypeScript guides. It primarily focuses on build-time integration rather than providing runtime utilities, and its release cadence has become infrequent due to its maintenance status.

Common errors

Warnings

Install

Quickstart

This quickstart demonstrates how to enable TypeScript transpilation in an Ember application's `ember-cli-build.js` using `ember-cli-babel` directly, reflecting the currently recommended setup after `ember-cli-typescript` entered maintenance mode. It also highlights the necessary type installations.

import EmberApp from 'ember-cli/lib/broccoli/ember-app';

module.exports = function(defaults) {
  let app = new EmberApp(defaults, {
    // This configuration enables TypeScript transpilation via ember-cli-babel,
    // which is the current recommended approach instead of relying on ember-cli-typescript.
    'ember-cli-babel': {
      enableTypeScriptTransform: true
    },
    // ... other build options ...
  });

  // To ensure proper type checking and IDE support, also install the necessary types:
  // npm install --save-dev typescript @tsconfig/ember @types/ember @types/qunit @types/rsvp
  // And set up your tsconfig.json to extend @tsconfig/ember/tsconfig.json

  return app.toTree();
};

view raw JSON →