mirror of
https://github.com/jellyfin/jellyfin-vue.git
synced 2024-12-12 08:15:47 +00:00
28 lines
634 B
TypeScript
28 lines
634 B
TypeScript
import { Context } from '@nuxt/types';
|
|
import { TvShowsApi } from '~/api/api';
|
|
import { Configuration } from '~/api/configuration';
|
|
import { PluginInjection } from '~/types/utils';
|
|
|
|
declare module '@nuxt/types' {
|
|
interface Context {
|
|
$tvShowsApi: TvShowsApi;
|
|
}
|
|
|
|
interface NuxtAppOptions {
|
|
$tvShowsApi: TvShowsApi;
|
|
}
|
|
}
|
|
|
|
declare module 'vue/types/vue' {
|
|
interface Vue {
|
|
$tvShowsApi: TvShowsApi;
|
|
}
|
|
}
|
|
|
|
export default (context: Context, inject: PluginInjection): void => {
|
|
const config = new Configuration();
|
|
|
|
const tvShowsApi = new TvShowsApi(config, '', context.$axios);
|
|
inject('tvShowsApi', tvShowsApi);
|
|
};
|