What exactly do you want to do with that int? Can you post a code example?
In general terms, from the type system’s perspective, there’s a possibility that number is None (or, in JS/TS terms, undefined). So you have to handle this case somehow. See Null, Undefined and Option, for starters.