嗨,现在我正在学习JavaScript。我刚发现的一些JavaScript混淆了。这是源代码
import type { OptionsType } from 'Types'
const theme: OptionsType = {
title: 'Lawton',
baseFontSize: '16px',
baseLineHeight: 1.5
}在代码中,const变量使用":"声明。
":"在表达式中的意思是什么?
它是否等同于
const theme = OptionsType = { title: 'Lawton' }发布于 2018-01-11 04:22:01
":“在表达中是什么意思?
我是FlowType。签出注释上的文档:https://flow.org/en/docs/getting-started/
更多
这不是TypeScript,因为import type是一个流的东西:https://flow.org/en/docs/types/modules/#importing-and-exporting-types-a-classtoc-idtoc-importing-and-exporting-types-hreftoc-importing-and-exporting-typesa
https://stackoverflow.com/questions/48199394
复制相似问题