Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Typescript compile error: error TS1109: Expression expected

Tags:

typescript

I have this very simple typescript file:

export default const VERSION: number = 2016030600;

Then I run:

tsc version.ts

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.

like image 348
Dongsheng Cai Avatar asked Mar 06 '16 00:03

Dongsheng Cai


1 Answers

Do your VERSION assignment as a separate statement:

const VERSION: number = 2016030600;
export default VERSION;
like image 149
Nathan Friend Avatar answered Oct 06 '22 00:10

Nathan Friend