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

Infer Return Type of useOverlay().open Based on Component Emits #3706

Closed
yulafezmesi opened this issue Mar 27, 2025 · 1 comment · Fixed by #3716
Closed

Infer Return Type of useOverlay().open Based on Component Emits #3706

yulafezmesi opened this issue Mar 27, 2025 · 1 comment · Fixed by #3716
Labels
enhancement New feature or request triage v3 #1289

Comments

@yulafezmesi
Copy link

yulafezmesi commented Mar 27, 2025

Description

currently, overlay.open() returns a value of type any. possibly infer types from component emits?

const emit = defineEmits<{
  close:[boolean] 
}>

Calling overlay.open() should ideally return a Promise<boolean> (or boolean directly, depending on the implementation), inferred from the close event:

const payload = overlay.open()
// boolean
@yulafezmesi yulafezmesi added enhancement New feature or request triage v3 #1289 labels Mar 27, 2025
@yulafezmesi yulafezmesi changed the title Infer return types for useOverlay().open function from component emits Infer Return Type of useOverlay().open Based on Component Emits Mar 27, 2025
Copy link
Member

@genu Do you have any hint on this?

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

Successfully merging a pull request may close this issue.

2 participants