Currently, I am in the process of developing my own UMD library using typescript and webpack. However, I encountered an issue when importing a file that resulted in the error TS2339 (Property 'makeRequest' does not exist on type 'typeof Utils'). It is worth mentioning that both files are located within the same folder
The following are my two files:
assets.ts
'use strict';
import Utils from './utils';
export default class Assets {
constructor() {}
search(api: any, query: any) {
let request = {
path: `/assets`,
type: 'POST',
data: query
};
return Utils.makeRequest(api, request);
}
}
utils.ts
'use strict';
export default class Utils {
makeRequest(api: any, request: any): void {}
}