import { AxiosResponse } from 'axios' ; import { makeRequest } from '../makeRequest' ; import { DevToApiResponse } from '../../types/redux/articles-reducer-types' ; EXPORTS export { getAllLatestArticles } ; api function returns { object } const getAllLatestArticles = ( ) : Promise < AxiosResponse < DevToApiResponse > > => { return makeRequest ( { url : `https://dev.to/api/articles/me/published` , method : 'GET' , headers : { 'api-key' : process . env . DEV_TO_API_KEY , } , } ) ; } ;