我正在导入一个模块,该模块具有许多作为属性的函数,并使用如下字符串访问这些函数:
imported_module[typed enumerated string]().then(res => console.log(res))
这将引发如下错误:
This expression is not callable.
Each member of the union type '(<TResult1 = UserResult,TResult2 = never>(onfulfilled?: ((value: UserResult) => TResult1 | PromiseLike<TResult1>) | null | undefine
d,onrejected?: ((reason: any) => TResult2 | PromiseLike<...>) | ... 1 more ... | undefined) => Promise<...>) | (<TResult1 = void,TResult2 = never>(onfulfilled?: ((
value: void) => TRes...' has signatures,but none of those signatures are compatible with each other. TS2349
我该如何解决?包裹有问题吗?