I trying to implement google auth in my ionic2 app. I need it works in browser. So, I installed:
npm install --save @types/gapi
npm install --save @types/gap
The current declarations for gapi and for gapi.auth2 are global declarations.
They might not be automatically with @types
because looking into node_modules
either requires an explicit import
or adding your libraries to the types
field in your tsconfig.json
.
So try fixing up the following types
field to your compilerOptions
:
"compilerOptions": {
"types": ["gapi", "gapi.auth2"]
}