Add type definitions for event emitter

This commit is contained in:
Pig Fang 2018-09-08 15:27:41 +08:00
parent 4db7872c02
commit f0d4e5bfdb

View File

@ -14,6 +14,13 @@ declare global {
}
}
interface Window {
bsEmitter: {
on(eventName: string, listener: Function): void
emit(eventName: string, payload: object): void
}
}
declare module 'vue/types/vue' {
interface Vue {
$t(key: string, parameters?: object): string