ember-cli-typescript icon indicating copy to clipboard operation
ember-cli-typescript copied to clipboard

Import Ember's namespace as a Type-Only import

Open MrChocolatine opened this issue 4 years ago • 1 comments

Since the project runs with TypeScript v4.0.5 https://github.com/typed-ember/ember-cli-typescript/blob/ecb513be474b6db641c0aa36b176a8351eb4ed14/package.json#L126

should we import Ember's namespace as a Type-Only import?

https://github.com/typed-ember/ember-cli-typescript/blob/ecb513be474b6db641c0aa36b176a8351eb4ed14/ts/blueprints/ember-cli-typescript/index.js#L6

Suggestion

import type Ember from 'ember';

MrChocolatine avatar Jan 14 '21 11:01 MrChocolatine

Hmm. I'd be surprised if that even works correctly. Namespaces are properly value types, and folks still regularly need to use it to refer to e.g. Ember.testing.

chriskrycho avatar Jan 15 '21 15:01 chriskrycho