Typings to use path strings with Ember.Object
and Ember.Array
APIs:
obj.get('path.to.something');
array.mapBy('path.to.something');
Ember.get(obj, dynamicPathString);
This is an optional dependency because you will lose a great deal of type safety.
person.get('fullNmae'); // typo is no longer caught
let value: string = obj.get('some.number'); // return type is not type-checked
With npm:
npm install ember-unsafe-typings --save-dev
With yarn:
yarn add ember-unsafe-typings --dev
Import the module from one of your typescript sources:
// app.ts
import 'ember-unsafe-typings';