We have Vue app where unfortunatelly JavaScript and TypeScript code are mixed.
- The API call looks as following (.ts file):
- gpbApi.js:
import * as leadService from '@/utils/api/leadService';
import Vue from 'vue';
Vue.prototype.$gpbApi = {
leadService,
};
- leadService.js:
import axios from 'axios';
export async function getReqtypes() {
const { data } = await axios.get(`${path}/Reqtype`, { withCredentials: true });
return data.data;
}
export async function getCities() {
const { data } = await axios.get(`${path}/Nsi/City`, { withCredentials: true });
return data.data;
}
As you can see there is an error in .ts file. How can I overcome the issue?