For those who might have the same problem as me, make sure you add @types/gapi.auth2 to your devDependencies. This should be in the doc though.
I also had to add in this to my tsconfig.json
{
"compilerOptions": {
"types": ["gapi", "gapi.auth2"]
}
}
Seems like, until now it isn't on docs?
Most helpful comment
For those who might have the same problem as me, make sure you add
@types/gapi.auth2to your devDependencies. This should be in the doc though.