I'm new to typescript and working on an Angular 2 app. I need to access some js libraries with type definitions available from definitelytyped. I installed the dependencies using typings. But can't figure out how to access them in my app components.
More specifically, say I install the angular-toastr library:
npm install angular-toastr --save
typings install angular-toastr --ambient --save
This installs the angular-toastr dependency to /typings/main/ambient/angular-toastr/angular-toastr.d.ts
I then added the reference to this to my main.d.ts file in the /typings
folder.
/// <reference path="main/ambient/angular-toastr/angular-toastr.d.ts" />
After this, I try to reference it directly in my components, but haven't quite figured out how to.
Are there any other steps I missed? And how would I import it into a component and use the methods provided?
Thanks
tsconfig.json
file. – blakeembrey