CatchClause params now ESTree.Pattern | null (#41383)

This commit is contained in:
Timofey Kachalov 2020-01-09 01:48:05 +03:00 committed by Armando Aguirre
parent 5785021dc4
commit 3bfd0a345d
2 changed files with 6 additions and 2 deletions

View File

@ -126,6 +126,10 @@ literal = directive.expression;
// $ExpectType string
directive.directive;
// pattern
var pattern: ESTree.Pattern;
var patternOrNull: ESTree.Pattern | null;
// IfStatement
var ifStatement: ESTree.IfStatement;
expression = ifStatement.test;
@ -256,7 +260,7 @@ statement = switchCase.consequent[0];
// CatchClause
string = catchClause.type;
pattern = catchClause.param;
patternOrNull = catchClause.param;
blockStatement = catchClause.body;
// Misc

View File

@ -342,7 +342,7 @@ export interface SwitchCase extends BaseNode {
export interface CatchClause extends BaseNode {
type: "CatchClause";
param: Pattern;
param: Pattern | null;
body: BlockStatement;
}