Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

114
Views
require typescript and multiple implementations

I'm using a typescript. I have to import Axios lib with "require" but I'm getting an any type as the result

const axios = require('axios').Axios;
const response = await axios.get(url);

Error: "Unsafe call of any typed value". axios is an "any type" state. require('axios') is in "multiple implementations" state. Why it's not typed? Everything works whren I'm using "import":

import Axios from 'Axios';

Variants I tried and got fail:

const axios = require('axios').Axios;
const response = await axios.get(url);

const axios = require('axios');
const response = await axios.get(url);

const axios = require('axios').get;
const response = await get(url);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

try

const axios = require('axios');
const response = await axios.get(url);

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!