devbaji / vue3-google-login

Add Sign In With Google feature to your Vue 3 application
https://github.com/devbaji/vue3-google-login/
MIT License
202 stars 30 forks source link

Running into TypeScript issue due to Options not being optional #19

Closed thejoecode closed 1 year ago

thejoecode commented 1 year ago

https://github.com/yobaji/vue3-google-login/blob/014e9ab0ddf024429bfc6a6178e29663505eca82/src/plugin/index.ts#L28

app.use(vue3GoogleLogin, { clientId: "some_id", });

Argument of type '{ clientId: string; }' is not assignable to parameter of type 'Options'. Type '{ clientId: string; }' is missing the following properties from type 'Options': idConfiguration, buttonConfig, callback, error

TS: 4.9.4 "vue": "^3.2.47",

Couldn't the type be modified to allow for the style of passing options shown in all the docs?

install: (app: App, options: Options | PopupOptions) => {

My current work around is to add as any:

app.use(vue3GoogleLogin, { clientId: "some_id", } as any);

aramgyulnazaryan commented 1 year ago

I have the same issue.

devbaji commented 1 year ago

@thejoecode and @aramgyulnazaryan can you guys try with the latest version 2.0.14, and check if the issue is fixed

thejoecode commented 1 year ago

I'm able to just supply the clientId now without needing any. Thank you!