minus operator -
does not necessarily return a number
#56162
Labels
Duplicate
An existing issue was already created
π Search Terms
"minus operator", "minus bigint", "minus any"
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?target=7#code/MYewdgzgLgBAhgLjmAnjAvDAjABjAKABsBTWAIwxgFo58KBqTAViA
π» Code
π Actual behavior
b
type isnumber
π Expected behavior
b
type should benumber | bigint
Additional information about the issue
Here's another example showing that other operators can potentially be affected
https://www.typescriptlang.org/play?target=7#code/MYGwhgzhAECC0G9oG0DKBPAtgIwPYgDoAXXABQCcBLTSoygNwFMBdaAXmgAoBKdgPmgBGAHbQAvgCgJwXMIhFoYAFxx20YYwDucHlJlyF2NWAL0wIAK6MA8gDNd++dGBqAtGGmynAEzUA-DwB6QOgAA2xQgBow4FDFYV9Q7ziidAAHRhgIAAtcCwTobEYw7EoAc0phIlCgA
The text was updated successfully, but these errors were encountered: