axios-cached-dns-resolve icon indicating copy to clipboard operation
axios-cached-dns-resolve copied to clipboard

Package not working in TypeScript

Open jeff-mistplay opened this issue 6 months ago • 0 comments

Is this library fully supported in TypeScript? If I try to import in any .ts file:

import { registerInterceptor } from "axios-cached-dns-resolve";

An error is returned similar to:

/path/to/my/repo/node_modules/axios-cached-dns-resolve/index.js:1
export {
^^^^^^

SyntaxError: Unexpected token 'export'
    at Object.compileFunction (node:vm:360:18)
    at wrapSafe (node:internal/modules/cjs/loader:1084:15)
    at Module._compile (node:internal/modules/cjs/loader:1119:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
    at Module.load (node:internal/modules/cjs/loader:1033:32)
    at Function.Module._load (node:internal/modules/cjs/loader:868:12)
    ...

jeff-mistplay avatar Aug 14 '24 16:08 jeff-mistplay