问题描述
我正在将我的React项目迁移到打字稿中。
下面是代码段:
import { schema } from 'normalizr'
schema.Entity.prototype.basePath = '';
schema.Entity.prototype.endpoint = function (path: string,params: any,qsParams: string) {
const root = config.api.httpRootUrl
const query = typeof qsParams !== 'undefined' ? `?${qsParams}` : ''
return `${root}${replacePathParams(this.paths[path || 'list'],params || {})}${query}`
}
如何为这种情况添加正确的类型?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)