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

Add type Ref for TypeScript #10

Open
sebastiaan-de-vries opened this issue Jul 16, 2021 · 3 comments
Open

Add type Ref for TypeScript #10

sebastiaan-de-vries opened this issue Jul 16, 2021 · 3 comments
Labels
enhancement New feature or request pr welcome

Comments

@sebastiaan-de-vries
Copy link

Thank you for this helpful package!

Would it be possible to add the Ref type so that the following import could also be removed from the users' code:

import type { Ref } from 'vue'
@antfu
Copy link
Owner

antfu commented Jul 16, 2021

I don't know if it's good to have yet possible to do. Feel free to experiment with it, and if you figure out a way, maybe we could enabled it via

import 'vue-global-api/types'

@antfu antfu added enhancement New feature or request pr welcome labels Jul 16, 2021
@SubZtep
Copy link

SubZtep commented Jul 17, 2021

Hi, it would be great to do (also VueUse support would be super handy).

This is how I manage it atm in local typeRoot:

type Ref<T = any> = import("@vue/reactivity").Ref<T>

@sebastiaan-de-vries
Copy link
Author

Hi, it would be great to do (also VueUse support would be super handy).

This is how I manage it atm in local typeRoot:

type Ref<T = any> = import("@vue/reactivity").Ref<T>

Thank you, this works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pr welcome
Projects
None yet
Development

No branches or pull requests

3 participants