【发布时间】:2016-04-24 17:17:13
【问题描述】:
我将一些遗留代码导入到新的流星包中。我必须调整很多东西才能让它工作,但我惊讶地发现流星礼貌地忽略了我所有的流类型注释,例如:
GmailApi = class {
gmail: Object;
constructor() {
// HACK(chris): Keep the gmail api instance,
// to facilitate stubbing it in the test.
this.gmail = google.gmail('v1');
}
/**
* Sends an email.
*/
send(email: Email): Promise {
似乎meteor使用了babel; babel 可以移除这些注解,但只能使用正确的选项,而我没有添加那些。
为什么会这样?
【问题讨论】: