Skip to content

Commit

Permalink
fix(types): remove vue3 only type reference (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianOsipiuk authored Mar 16, 2022
1 parent e8a0c5e commit b06bd0a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/vue/vueQueryPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { isVue2 } from "vue-demi";
import { QueryClient } from "react-query/core";

import type { QueryClientConfig } from "react-query/types/core";
import type { Plugin } from "vue";

import { getClientKey } from "./utils";

Expand All @@ -25,8 +24,8 @@ interface ClientOptions {

export type VueQueryPluginOptions = ConfigOptions | ClientOptions;

export const VueQueryPlugin: Plugin = {
install: (app, options: VueQueryPluginOptions = {}) => {
export const VueQueryPlugin = {
install: (app: any, options: VueQueryPluginOptions = {}) => {
const clientKey = getClientKey(options.queryClientKey);
let client: QueryClient;

Expand All @@ -47,9 +46,7 @@ export const VueQueryPlugin: Plugin = {
});
};

// @ts-expect-error onUnmount is not released yet
if (app.onUnmount) {
// @ts-expect-error onUnmount is not released yet
app.onUnmount(cleanup);
} else {
const originalUnmount = app.unmount;
Expand Down

1 comment on commit b06bd0a

@vercel
Copy link

@vercel vercel bot commented on b06bd0a Mar 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.