落伍了哦:( https://github.com/github/fetch/blob/master/fetch.js.flow 中的代码:
type RequestOptions = {|
body?: ?BodyInit;
credentials?: CredentialsType;
headers?: HeadersInit;
method?: string;
mode?: string;
referrer?: string;
signal?: ?AbortSignal;
|}
上面的类型定义{| ……|}什么用? body?: ?BodyInit; 第二个问号又作何解
谢谢
回复 (1)
J
这就是 flow 啊。https://flow.org
参与回复
登录后即可参与回复。登录