18 lines
247 B
TypeScript
18 lines
247 B
TypeScript
import mitt from 'mitt'
|
|
|
|
type Events = {
|
|
openPost: IPost
|
|
startLoading: boolean
|
|
eventBus: INotification
|
|
}
|
|
|
|
export default defineNuxtPlugin(() => {
|
|
const emitter = mitt<Events>()
|
|
|
|
return {
|
|
provide: {
|
|
mitt: emitter,
|
|
},
|
|
}
|
|
})
|