CNode

.js.flow后缀文件是typescript?还是facebook搞出来的?

问答
Xxinggsf发布于6 年前最后回复6 年前1 回复3911 浏览0 收藏

落伍了哦:( 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
justjavac#1·6 年前

这就是 flow 啊。https://flow.org

参与回复
登录后即可参与回复。登录