Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript type needs updating in index.d.ts #102

Open
StuartCreed opened this issue Sep 21, 2022 · 0 comments
Open

Typescript type needs updating in index.d.ts #102

StuartCreed opened this issue Sep 21, 2022 · 0 comments

Comments

@StuartCreed
Copy link

StuartCreed commented Sep 21, 2022

Vue version: 2.7.7
index.d.ts line 7 needs changing to include the PluginFunction generic type.
It is currently:
export declare const StoryblokVue: PluginObject<SbSDKOptions>;
It should be:
export declare const StoryblokVue: PluginObject<SbSDKOptions> | PluginFunction<SbSDKOptions>
to match Vue use types:

use<T>( plugin: PluginObject<T> | PluginFunction<T>, options?: T ): VueConstructor<V>

Typescript error: Argument of type 'PluginObject' is not assignable to parameter of type 'PluginObject | PluginFunction'.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant