下面這段typescript代碼:function rule(name?: string, options?: IRuleOptions)(func: IRuleFunction): Rule
export type IRuleFunction = (
parent?: any,
args?: any,
context?: any,
info?: GraphQLResolveInfo,
) => IRuleResult | Promise<IRuleResult>interface IRuleOptions {
cache?: ICacheOptions
fragment?: IFragment
}問題:第一行代碼如下:function rule(name?: string, options?: IRuleOptions)(func: IRuleFunction): Rule
------------------------------------- ------------------- ----
(1) (2) (3)(1)是函數的參數,可以看懂。(2)和(3)是什么意思?請大佬指導一下,謝謝更新: 代碼來源:https://github.com/maticzav/g...
- 1 回答
- 0 關注
- 780 瀏覽
添加回答
舉報
0/150
提交
取消