1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
pub use self::{
    class_properties::class_properties, private_in_object::private_in_object,
    static_blocks::static_blocks,
};
use swc_common::chain;
use swc_ecma_visit::Fold;

pub mod class_properties;
pub mod private_in_object;
pub mod static_blocks;

pub fn es2022(config: Config) -> impl Fold {
    chain!(
        static_blocks(),
        class_properties(class_properties::Config {
            loose: config.loose,
        }),
        private_in_object(),
    )
}

#[derive(Debug, Clone, Default)]
pub struct Config {
    pub loose: bool,
}