sirisian / ecmascript-types

ECMAScript Optional Static Typing Proposal http://sirisian.github.io/ecmascript-types/
453 stars 4 forks source link

Typed modulus behavior. #63

Open sirisian opened 3 years ago

sirisian commented 3 years ago

Noticed this: https://es.discourse.group/t/modulo-operator/126

Might be useful to have typed variables treat % with negatives as expected. Could do this without the need for special operators. If that's confusing behavior would be the bigger question. For integer division I don't think it was as that is the expected behavior, but Number has created a number of assumptions.