【发布时间】:2017-10-10 00:08:28
【问题描述】:
我遇到了这个源代码。 第一行看不懂:
import type { a, b, c, d } from 'types'
有什么区别
import { a, b, c, d } from 'types'
你能解释一下吗?谢谢
import type { a, b, c, d } from 'types'// not sure what it does
import { a, b, c, d } from 'types' // I am familar with this
【问题讨论】:
-
type这个词后面有逗号吗? -
不,没有逗号,代码按预期工作,缺少逗号实际上让我感到困惑
-
代码使用flowtype
-
是的@Radex 是正确的,它应该使用flowtype。
标签: javascript ecmascript-6 flowtype