mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
CatchClause params now ESTree.Pattern | null (#41383)
This commit is contained in:
parent
5785021dc4
commit
3bfd0a345d
@ -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
|
||||
|
||||
2
types/estree/index.d.ts
vendored
2
types/estree/index.d.ts
vendored
@ -342,7 +342,7 @@ export interface SwitchCase extends BaseNode {
|
||||
|
||||
export interface CatchClause extends BaseNode {
|
||||
type: "CatchClause";
|
||||
param: Pattern;
|
||||
param: Pattern | null;
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user