mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
100 lines
3.4 KiB
Plaintext
100 lines
3.4 KiB
Plaintext
//// [tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNumericLiteral.ts] ////
|
|
|
|
=== comparisonOperatorWithNumericLiteral.ts ===
|
|
type BrandedNum = number & { __numberBrand: any };
|
|
>BrandedNum : Symbol(BrandedNum, Decl(comparisonOperatorWithNumericLiteral.ts, 0, 0))
|
|
>__numberBrand : Symbol(__numberBrand, Decl(comparisonOperatorWithNumericLiteral.ts, 0, 28))
|
|
|
|
var x : BrandedNum;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
>BrandedNum : Symbol(BrandedNum, Decl(comparisonOperatorWithNumericLiteral.ts, 0, 0))
|
|
|
|
// operator >
|
|
x > 0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x > <number>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x > <BrandedNum>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
>BrandedNum : Symbol(BrandedNum, Decl(comparisonOperatorWithNumericLiteral.ts, 0, 0))
|
|
|
|
// operator <
|
|
x < 0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x < <number>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x < <BrandedNum>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
>BrandedNum : Symbol(BrandedNum, Decl(comparisonOperatorWithNumericLiteral.ts, 0, 0))
|
|
|
|
// operator >=
|
|
x >= 0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x >= <number>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x >= <BrandedNum>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
>BrandedNum : Symbol(BrandedNum, Decl(comparisonOperatorWithNumericLiteral.ts, 0, 0))
|
|
|
|
// operator <=
|
|
x <= 0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x <= <number>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x <= <BrandedNum>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
>BrandedNum : Symbol(BrandedNum, Decl(comparisonOperatorWithNumericLiteral.ts, 0, 0))
|
|
|
|
// operator ==
|
|
x == 0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x == <number>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x == <BrandedNum>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
>BrandedNum : Symbol(BrandedNum, Decl(comparisonOperatorWithNumericLiteral.ts, 0, 0))
|
|
|
|
// operator !=
|
|
x != 0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x != <number>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x != <BrandedNum>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
>BrandedNum : Symbol(BrandedNum, Decl(comparisonOperatorWithNumericLiteral.ts, 0, 0))
|
|
|
|
// operator ===
|
|
x === 0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x === <number>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x === <BrandedNum>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
>BrandedNum : Symbol(BrandedNum, Decl(comparisonOperatorWithNumericLiteral.ts, 0, 0))
|
|
|
|
// operator !==
|
|
x !== 0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x !== <number>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
|
|
x !== <BrandedNum>0;
|
|
>x : Symbol(x, Decl(comparisonOperatorWithNumericLiteral.ts, 1, 3))
|
|
>BrandedNum : Symbol(BrandedNum, Decl(comparisonOperatorWithNumericLiteral.ts, 0, 0))
|
|
|