mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-26 09:19:04 -05:00
add test
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
type BrandedNum = number & { __numberBrand: any };
|
||||
var x : BrandedNum;
|
||||
|
||||
// operator >
|
||||
x > 0;
|
||||
x > <number>0;
|
||||
x > <BrandedNum>0;
|
||||
|
||||
// operator <
|
||||
x < 0;
|
||||
x < <number>0;
|
||||
x < <BrandedNum>0;
|
||||
|
||||
// operator >=
|
||||
x >= 0;
|
||||
x >= <number>0;
|
||||
x >= <BrandedNum>0;
|
||||
|
||||
// operator <=
|
||||
x <= 0;
|
||||
x <= <number>0;
|
||||
x <= <BrandedNum>0;
|
||||
|
||||
// operator ==
|
||||
x == 0;
|
||||
x == <number>0;
|
||||
x == <BrandedNum>0;
|
||||
|
||||
// operator !=
|
||||
x != 0;
|
||||
x != <number>0;
|
||||
x != <BrandedNum>0;
|
||||
|
||||
// operator ===
|
||||
x === 0;
|
||||
x === <number>0;
|
||||
x === <BrandedNum>0;
|
||||
|
||||
// operator !==
|
||||
x !== 0;
|
||||
x !== <number>0;
|
||||
x !== <BrandedNum>0;
|
||||
Reference in New Issue
Block a user