Skip to content

Fix AsyncComputed type. #116

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rudolfbyker
Copy link

PluginFunction<never> should be PluginFunction<void>, otherwise the following code will not satisfy TS checks:

import Vue from "vue";
import AsyncComputed from "vue-async-computed";
Vue.use(AsyncComputed, {})

image

never means "this function never returns", while void means "this function always returns undefined"

@boukeversteegh
Copy link

Great! Seems like a simple fix to a problem I've also encountered. Can we merge this? @foxbenjaminfox

@rudolfbyker
Copy link
Author

rudolfbyker commented Dec 1, 2022

More than a year later. Very simple fix. Please merge this.

@cdrini
Copy link
Collaborator

cdrini commented Nov 20, 2023

Hello @rudolfbyker , I'm helping maintain this repo now. Any chance you'd be able to revisit this PR now that the project's migrated to Vue 3? I reckon all the types could use an overhaul possibly.

@rudolfbyker
Copy link
Author

Sorry, I no longer use this project. But feel free to still merge or close my PR as you see fit.

@cdrini
Copy link
Collaborator

cdrini commented Nov 22, 2023

No worries, thanks @rudolfbyker ! I'll see if the types are still valid in Vue 3 when I get the chance.

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.

3 participants