blessing-skin-server/resources/assets/tests/shims.d.ts

27 lines
1.0 KiB
TypeScript
Raw Normal View History

2018-08-06 12:14:20 +08:00
import Vue from 'vue'
2019-03-25 22:01:57 +08:00
import { Message, MessageBox } from 'element-ui'
import { ElMessageBoxOptions } from 'element-ui/types/message-box'
2018-08-06 12:14:20 +08:00
declare module 'vue/types/vue' {
interface VueConstructor {
prototype: Vue & {
$http: {
get: jest.Mock<any>
post: jest.Mock<any>
2019-09-08 15:20:49 +08:00
put: jest.Mock<any>
del: jest.Mock<any>
2019-11-25 23:30:51 +08:00
}
2019-03-25 22:01:57 +08:00
$message: {
info: jest.Mock<ReturnType<typeof Message>, Parameters<typeof Message>>
success: jest.Mock<ReturnType<typeof Message>, Parameters<typeof Message>>
warning: jest.Mock<ReturnType<typeof Message>, Parameters<typeof Message>>
error: jest.Mock<ReturnType<typeof Message>, Parameters<typeof Message>>
2018-08-06 12:14:20 +08:00
}
2019-03-25 22:01:57 +08:00
$msgbox: jest.Mock<ReturnType<typeof MessageBox>, [ElMessageBoxOptions]>
$alert: jest.Mock<ReturnType<typeof MessageBox>, [string, ElMessageBoxOptions]>
$confirm: jest.Mock<ReturnType<typeof MessageBox>, [string, ElMessageBoxOptions]>
$prompt: jest.Mock<ReturnType<typeof MessageBox>, [string, ElMessageBoxOptions]>
2018-08-06 12:14:20 +08:00
}
}
}