刚发现的一些JavaScript存在混淆,这是源代码
import type { OptionsType } from 'Types'
const theme: OptionsType = {
title: 'Lawton',
baseFontSize: '16px',
baseLineHeight: 1.5
}
在代码中,const变量用“:”声明
什么是“:”在表达什么意思?
是等同于
const theme = OptionsType = { title: 'Lawton' }
发布于 2018-10-08 10:25:29
“:”在表达式中意味着什么?
这是FlowType。查看注释上的文档:https://flow.org/en/docs/getting-started/
https://stackoverflow.com/questions/-100002847
复制相似问题