Fix type definitions
This commit is contained in:
parent
ec42b4b4eb
commit
f41b912e53
12
resources/assets/src/shims.d.ts
vendored
12
resources/assets/src/shims.d.ts
vendored
@ -1,7 +1,7 @@
|
||||
/* eslint-disable camelcase */
|
||||
import Vue from 'vue'
|
||||
import * as JQuery from 'jquery'
|
||||
import { ModalOptions } from './scripts/notify'
|
||||
import { ModalOptions, ModalResult } from './scripts/modal'
|
||||
import { Toast } from './scripts/toast'
|
||||
|
||||
type I18n = 'en' | 'zh_CN'
|
||||
|
||||
@ -34,12 +34,8 @@ declare global {
|
||||
}
|
||||
|
||||
notify: {
|
||||
showModal(
|
||||
message: string,
|
||||
title?: string,
|
||||
type?: string,
|
||||
options?: ModalOptions
|
||||
)
|
||||
showModal(options?: ModalOptions): Promise<ModalResult>
|
||||
toast: Toast
|
||||
}
|
||||
}
|
||||
}
|
||||
|
3
resources/assets/tests/shims.d.ts
vendored
3
resources/assets/tests/shims.d.ts
vendored
@ -1,3 +1,5 @@
|
||||
import Vue from 'vue'
|
||||
|
||||
declare module 'vue/types/vue' {
|
||||
interface VueConstructor {
|
||||
prototype: Vue & {
|
||||
@ -7,6 +9,7 @@ declare module 'vue/types/vue' {
|
||||
put: jest.Mock<any>
|
||||
del: jest.Mock<any>
|
||||
}
|
||||
$t(key: string, parameters?: object): string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user