Reputation: 191
Ionic2 now use @types to support for third-party libraries.
I installed
npm install --save @types/gapi.auth2
But I don't know how to add my project to use it. Please help me
Upvotes: 0
Views: 264
Reputation: 22372
It should be pretty easy after you have installed @types/gapi.auth2, just add in your tsconfig.json
in compilerOptions
section the following line:
"types": ["gapi.auth2"]
And make sure you are using typescript 2.x
Hope this helps.
Upvotes: 1