use-js-export 0.0.1

JavaScript export metadata primitives for RustUse
Documentation
1
2
3
4
5
6
7
8
9
use use_js_export::{JsExportKind, JsExportSpecifier, JsExportStatementParts};

fn main() {
    let parts = JsExportStatementParts::new(JsExportKind::Named)
        .with_specifier(JsExportSpecifier::named("Button", Some("Button")));

    assert_eq!(parts.kind(), JsExportKind::Named);
    assert_eq!(parts.specifiers()[0].exported(), Some("Button"));
}