use oxc_ast::ast::Statement;
pub(super) fn throws(statement: &Statement<'_>) -> bool {
match statement {
Statement::ThrowStatement(_) => true,
Statement::BlockStatement(block) => {
matches!(block.body.as_slice(), [Statement::ThrowStatement(_)])
}
_ => false,
}
}