use std::any::Any; use swc_visit::define; /// Visitable nodes. pub trait Node: Any {} impl Node for T where T: Any {} pub struct Item { pub vec_opt1: Vec>, pub vec_opt2: Vec>, } pub enum Enum { Item(Item), } define!({ pub struct Item { pub vec_opt1: Vec>, pub vec_opt2: Vec>, } pub enum Enum { Item(Item), } });