index.d.ts 452 B

1234567891011121314151617181920
  1. import Vue from 'vue'
  2. import { PluginObject } from 'vue/types/plugin'
  3. interface IParam {
  4. callbackQuery?: string
  5. callbackName?: string
  6. [key: string]: any
  7. }
  8. declare module 'vue' {
  9. function jsonp (url: string, param: IParam, timeout?: number): Promise<any>
  10. }
  11. declare module 'vue/types/vue' {
  12. interface Vue {
  13. $jsonp (url: string, param: IParam, timeout?: number): Promise<any>
  14. }
  15. }
  16. export default function install<T> (): PluginObject<T>