【发布时间】:2017-01-22 16:38:36
【问题描述】:
为什么在尝试声明 const 时出现错误:
Expecting new line or semicolon
export class MyClass{
const ALLOC_INVESTORS = "Allocation Investors";
}
【问题讨论】:
-
如果你 try it on the Playground 它会告诉你
const不能在类声明中使用。 -
@MikeMcCaughan typescript 类中 const 的替代方案是什么?
标签: angular typescript