19 lines
272 B
TypeScript
19 lines
272 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
|
||
|
}
|
||
|
}
|
||
|
})
|