import { Observable } from 'rxjs' ; import { getCurrentInstance } from 'vue' ; export type VueHook = ( hook : ( ) => any , ... args : any [ ] ) => any ; param hook export const fromHook = ( hook ) => new Observable < void > ( ctx => { getCurrentInstance ( ) && hook ( ( ) => ctx . next ( ) ) ; } ) ;