Skip to content

fix: PluginFunction type is not assignable to type options #267

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

Merged
merged 1 commit into from
Dec 12, 2019

Conversation

serialine
Copy link
Contributor

@serialine serialine commented Oct 31, 2019

How to reproduce

app.ts

Vue.use(InfiniteLoading, {
    slots: {
        noMore: '',
        error: '',
    },
});

TypeScript terminal

No overload matches this call.
  Overload 2 of 2, '(plugin: PluginObject<any> | PluginFunction<any>, ...options: any[]): VueConstructor<Vue>', gave the following error.
    Argument of type 'typeof InfiniteLoading' is not assignable to parameter of type 'PluginObject<any> | PluginFunction<any>'.
      Type 'typeof InfiniteLoading' is not assignable to type 'PluginObject<any>'.
        Types of property 'install' are incompatible.
          Type 'PluginFunction<never>' is not assignable to type 'PluginFunction<any>'.
            Type 'any' is not assignable to type 'never'.

How to fix

  • fix plugin install with assignable options type PluginFunction<never> to PluginFunction<InfiniteOptions>

@codecov
Copy link

codecov bot commented Oct 31, 2019

Codecov Report

Merging #267 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #267   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines         174    174           
  Branches       32     32           
=====================================
  Hits          174    174

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3792d95...562f646. Read the comment docs.

@ArthasEclat
Copy link

@PeachScript , I also stumbled upon it. Can you, please, merge this PR?

@PeachScript
Copy link
Owner

@ArthasEclat of course yes :D

@PeachScript PeachScript merged commit dd52d99 into PeachScript:master Dec 12, 2019
@serialine
Copy link
Contributor Author

@PeachScript : Can you publish latest release with merged this to registry? I think its not published npm registry yet

@agentschmitt
Copy link

@PeachScript I have the same problem when using options for the plugin.
Could you please release a new npm package, as the bug is already fixed with the PR. :)

@unachang113
Copy link

@PeachScript I have the same problem too. Could you please publish npm registry?

@PeachScript
Copy link
Owner

@unachang113 sorry for late, v2.4.5 released

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

Successfully merging this pull request may close these issues.

5 participants