From 6f2cd94cbfdb7d48ca66315c057ca642d509d2ac Mon Sep 17 00:00:00 2001 From: Lexus Drumgold Date: Sat, 20 Apr 2024 23:16:22 -0400 Subject: [PATCH] refactor(nodes)!: [`CatchClause`] specify patterns Signed-off-by: Lexus Drumgold --- src/nodes/catch-clause.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/nodes/catch-clause.ts b/src/nodes/catch-clause.ts index e078b5a..3bbffa9 100644 --- a/src/nodes/catch-clause.ts +++ b/src/nodes/catch-clause.ts @@ -5,12 +5,13 @@ import type { InternalComments } from '#internal' import type { + ArrayPattern, BlockStatement, Comments, Data, - Nothing, - Parent, - Pattern + Identifier, + ObjectPattern, + Parent } from '@flex-development/esast' import type { Optional } from '@flex-development/tutils' @@ -34,15 +35,16 @@ interface CatchClause extends Parent { /** * List of children. * + * @see {@linkcode ArrayPattern} * @see {@linkcode BlockStatement} * @see {@linkcode Comments} - * @see {@linkcode Nothing} - * @see {@linkcode Pattern} + * @see {@linkcode Identifier} + * @see {@linkcode ObjectPattern} */ children: | [ ...comments: Comments, - param: Pattern, + param: ArrayPattern | Identifier | ObjectPattern, ...comments: InternalComments, body: BlockStatement ]