fix(ts): fix context.app type (#5701)

This commit is contained in:
Kevin Marrec 2019-05-11 18:50:36 +02:00 committed by Pooya Parsa
parent 501c58608c
commit 732be3288e

View File

@ -1,4 +1,4 @@
import Vue from 'vue' import Vue, { ComponentOptions } from 'vue'
import VueRouter, { Route } from 'vue-router' import VueRouter, { Route } from 'vue-router'
import { Store } from 'vuex' import { Store } from 'vuex'
import { IncomingMessage, ServerResponse } from 'http' import { IncomingMessage, ServerResponse } from 'http'
@ -14,7 +14,7 @@ type Dictionary<T> = { [key: string]: T }
type NuxtState = Dictionary<any> type NuxtState = Dictionary<any>
export interface Context { export interface Context {
app: Vue app: NuxtAppOptions
/** /**
* @deprecated Use process.client instead * @deprecated Use process.client instead
*/ */
@ -81,7 +81,12 @@ export interface NuxtLoading extends Vue {
start(): NuxtLoading start(): NuxtLoading
} }
export interface NuxtAppOptions extends ComponentOptions<Vue> {
[key: string]: any // TBD
}
export interface NuxtApp extends Vue { export interface NuxtApp extends Vue {
$options: NuxtAppOptions
$loading: NuxtLoading $loading: NuxtLoading
isOffline: boolean isOffline: boolean
isOnline: boolean isOnline: boolean