提交 88334782 编写于 作者: fxy060608's avatar fxy060608

fix: type

上级 146f53f2
......@@ -38,11 +38,11 @@ export function createApi<T extends Function>(
fn: T,
protocol?: ApiProtocols
) {
return function(...args: any[]) {
return (function(...args: any[]) {
if (type === API_TYPE_SYNC) {
if (!(__DEV__ && protocol && !validateProtocol(name!, args, protocol))) {
return fn.apply(null, formatApiArgs(args, options))
}
}
}
} as unknown) as T
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册