打字稿编译错误:错误 TS1109:预期表达 [英] Typescript compile error: error TS1109: Expression expected
本文介绍了打字稿编译错误:错误 TS1109:预期表达的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个非常简单的打字稿文件:
I have this very simple typescript file:
export default const VERSION: number = 2016030600;
然后我跑:
tsc version.ts
打字稿编译器(版本 1.8.7,OS X)抱怨:
typescript compiler (Version 1.8.7, OS X) complains:
version.ts(1,16): error TS1109: Expression expected.
我该如何解决这个错误?谢谢.
How can I fix this error? Thank you.
推荐答案
将您的 VERSION
赋值作为单独的语句:
Do your VERSION
assignment as a separate statement:
const VERSION: number = 2016030600;
export default VERSION;
这篇关于打字稿编译错误:错误 TS1109:预期表达的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文