Skip to content

Commit

Permalink
fix(types): correct Vuex Store instance (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainLanz authored and pi0 committed Mar 11, 2019
1 parent 56df825 commit e5747eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'
import Vue from 'vue'
import './vuex'

interface NuxtAxiosInstance extends AxiosInstance {
$request<T = any>(config: AxiosRequestConfig): Promise<T>
Expand Down
7 changes: 7 additions & 0 deletions types/vuex.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { NuxtAxiosInstance } from '.'

declare module 'vuex' {
interface Store<S> {
$axios: NuxtAxiosInstance,
}
}

0 comments on commit e5747eb

Please sign in to comment.