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 Vue from 'vue'
|
||||||
import * as JQuery from 'jquery'
|
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'
|
type I18n = 'en' | 'zh_CN'
|
||||||
|
|
||||||
@ -34,12 +34,8 @@ declare global {
|
|||||||
}
|
}
|
||||||
|
|
||||||
notify: {
|
notify: {
|
||||||
showModal(
|
showModal(options?: ModalOptions): Promise<ModalResult>
|
||||||
message: string,
|
toast: Toast
|
||||||
title?: string,
|
|
||||||
type?: string,
|
|
||||||
options?: ModalOptions
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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' {
|
declare module 'vue/types/vue' {
|
||||||
interface VueConstructor {
|
interface VueConstructor {
|
||||||
prototype: Vue & {
|
prototype: Vue & {
|
||||||
@ -7,6 +9,7 @@ declare module 'vue/types/vue' {
|
|||||||
put: jest.Mock<any>
|
put: jest.Mock<any>
|
||||||
del: jest.Mock<any>
|
del: jest.Mock<any>
|
||||||
}
|
}
|
||||||
|
$t(key: string, parameters?: object): string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user