Skip to content

Typescript definition is broken (at least for cjs) #21

Closed
@orgads

Description

@orgads
import axios from 'axios';
import oauthClient from 'axios-oauth-client';
const axiosInstance = axios.create();
const func = oauthClient(axiosInstance, { url: '' });
const func = (0, axios_oauth_client_1.default)(axiosInstance, { url: '' });
                                              ^
TypeError: (0 , axios_oauth_client_1.default) is not a function
    at Object.<anonymous> (F:\Projects\jstest\dist\tstest.js:6:47)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions