Angular2-gantt-demo "gantt not defined"

I am following the angular2 tutorial:

npm install dhtmlx-gantt --save
npm install @types/dhtmlxgantt --save

I have the @types in my node_modules where gantt is declared:

declare var gantt: GanttStatic; (line 2236)

But when trying to access it inside a component I get “gantt is not defined”

ngOnInit() {

I have added “types”: [“dhtmlxgantt”] and npm start runs but when viewing and calling the ngOnInit it fails: “gantt is not defined” any help would be great.

Never mind, I found that I needed to add:

import ‘dhtmlx-gantt’;

import {} from “@types/dhtmlxgantt”;