Giter Site home page Giter Site logo

Comments (7)

KlwntSingh avatar KlwntSingh commented on June 6, 2024 2

@stephencawood , You can provide the reference to GoogleUser object the way @rubenCodeforges did in his example.
Just import gapi.auth2.GoogleUser and assign it to GoogleUser in service.ts like this
import GoogleUser = gapi.auth2.GoogleUser;

Refer the attached screenshot.
screenshot from 2017-11-25 20-28-44

Hope It helps!

from ng-gapi.

rubenCodeforges avatar rubenCodeforges commented on June 6, 2024

Hi , from typings, see the package json:

  "dependencies": {
    "@types/gapi": "^0.0.35",
    "@types/gapi.auth2": "^0.0.44"
  },

from ng-gapi.

stephencawood avatar stephencawood commented on June 6, 2024

Thanks for the message, I have those in there and I still get this:
error TS2304: Cannot find name 'GoogleUser'.

Is there an import statement required? I'll try rebuilding my modules.

from ng-gapi.

rubenCodeforges avatar rubenCodeforges commented on June 6, 2024

@stephencawood sure you need to import it , your IDE should do it for you and warn if a import is missing.
I never import by hand.

Do you work in a text editor ?
Better get a suited IDE , like webStorm , it has a 30 day trial , try it out.
Will save you a lot of time.

from ng-gapi.

stephencawood avatar stephencawood commented on June 6, 2024

Thanks. I'm using VS Code. I don't know why, but I had to reference it like this. Looks like a tsconfig issue, but I can't see the problem.

private user: gapi.auth2.GoogleUser;

from ng-gapi.

stephencawood avatar stephencawood commented on June 6, 2024

thanks @KlwntSingh. looks good

from ng-gapi.

rubenCodeforges avatar rubenCodeforges commented on June 6, 2024

@KlwntSingh thanks for help 👍

from ng-gapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.