convert TS to integer in Const