mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-29 16:29:19 -05:00
Merge pull request #37727 from Kingwl/logical_assignment
Add logical assignment operator
This commit is contained in:
@@ -203,6 +203,9 @@ namespace ts {
|
||||
GreaterThanGreaterThanGreaterThanEqualsToken,
|
||||
AmpersandEqualsToken,
|
||||
BarEqualsToken,
|
||||
BarBarEqualsToken,
|
||||
AmpersandAmpersandEqualsToken,
|
||||
QuestionQuestionEqualsToken,
|
||||
CaretEqualsToken,
|
||||
// Identifiers and PrivateIdentifiers
|
||||
Identifier,
|
||||
@@ -1608,6 +1611,9 @@ namespace ts {
|
||||
| SyntaxKind.LessThanLessThanEqualsToken
|
||||
| SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken
|
||||
| SyntaxKind.GreaterThanGreaterThanEqualsToken
|
||||
| SyntaxKind.BarBarEqualsToken
|
||||
| SyntaxKind.AmpersandAmpersandEqualsToken
|
||||
| SyntaxKind.QuestionQuestionEqualsToken
|
||||
;
|
||||
|
||||
// see: https://tc39.github.io/ecma262/#prod-AssignmentExpression
|
||||
@@ -1629,6 +1635,12 @@ namespace ts {
|
||||
| SyntaxKind.CommaToken
|
||||
;
|
||||
|
||||
export type LogicalOrCoalescingAssignmentOperator
|
||||
= SyntaxKind.AmpersandAmpersandEqualsToken
|
||||
| SyntaxKind.BarBarEqualsToken
|
||||
| SyntaxKind.QuestionQuestionEqualsToken
|
||||
;
|
||||
|
||||
export type BinaryOperatorToken = Token<BinaryOperator>;
|
||||
|
||||
export interface BinaryExpression extends Expression, Declaration {
|
||||
|
||||
Reference in New Issue
Block a user