You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
617 B

  1. import { Plugin } from '@nuxt/types'
  2. import { FromApiLabelItemListRepository } from '@/repositories/label/api'
  3. import { LabelApplicationService } from '@/services/application/label.service'
  4. export interface Services {
  5. label: LabelApplicationService
  6. }
  7. declare module 'vue/types/vue' {
  8. interface Vue {
  9. readonly $services: Services
  10. }
  11. }
  12. const plugin: Plugin = (context, inject) => {
  13. const labelRepository = new FromApiLabelItemListRepository()
  14. const label = new LabelApplicationService(labelRepository)
  15. const services: Services = {
  16. label
  17. }
  18. inject('services', services)
  19. }
  20. export default plugin