vue-async-computed icon indicating copy to clipboard operation
vue-async-computed copied to clipboard

Fix `AsyncComputed` type.

Open rudolfbyker opened this issue 3 years ago • 5 comments

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"

rudolfbyker avatar Oct 01 '21 10:10 rudolfbyker

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

boukeversteegh avatar Dec 21 '21 16:12 boukeversteegh

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

rudolfbyker avatar Dec 01 '22 05:12 rudolfbyker

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.

cdrini avatar Nov 20 '23 20:11 cdrini

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

rudolfbyker avatar Nov 22 '23 13:11 rudolfbyker

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

cdrini avatar Nov 22 '23 16:11 cdrini