How to convert a “String” value to “Type” in Angular 2 TS <p>This is my current object, Home refers to my import </p> <pre><code>import { Home } from '../home/home'; arr = [ { name: "Home", root: "Home", icon: "calc" } ]; </code></pre> <p>This is what i want to achieve:</p> <pre><code> import { Home } from '../home/home'; arr = [ { name: "Home", root: Home, icon: "calc" } ]; </code></pre> <p>Im getting a error because "Home" is a string. eval() works but i'm looking for a alternative</p> <p>Working code:</p> <pre><code> for (var i = 0; i &lt; arr.length; i++) { arr[i].root = eval(arr[i].root); } </code></pre>