kimroen / ember-cli-document-title

Adding document title behaviour to your ember app
MIT License
216 stars 61 forks source link

Add TypeScript ambient type information #66

Open mike-north opened 6 years ago

mike-north commented 6 years ago

Fixes #65

Because this is an 'extension of ember' kind of addon (often used without being explicitly imported), consumers will need to do one of two things in order to take advantage of this type information.

A. Indicate that this type information is to be included

tsconfig.json
{
  "compilerOptions": {
      "types": [
         "ember-cli-document-title"
       ]
  }
}

B. Import the entry point for this addon from somewhere in their project

app/app.ts
import Application from '@ember/application';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
import Resolver from './resolver';
// ⬇️ ⬇️ ⬇️ ⬇️ ⬇️ ⬇️ ⬇️ ⬇️ ⬇️ ⬇️ ⬇️ ⬇️ 
import 'ember-cli-document-title';

const App = Application.extend({ ... });
mike-north commented 6 years ago

@kimroen I responded to your feedback. This should be good to go now