diff --git a/Cargo.lock b/Cargo.lock index 16f9eaaa32b..ffc3b602f7b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5296,6 +5296,10 @@ dependencies = [ "serde_json", ] +[[package]] +name = "swc_typescript" +version = "0.1.0" + [[package]] name = "swc_visit" version = "0.5.14" diff --git a/Cargo.toml b/Cargo.toml index 8d04c656d4b..3059dd80dba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,6 +23,7 @@ members = [ "crates/swc_xml", "crates/swc_x_optimizer", "crates/swc_transform_common", + "crates/swc_typescript", ] resolver = "2" diff --git a/crates/swc_typescript/Cargo.toml b/crates/swc_typescript/Cargo.toml new file mode 100644 index 00000000000..8d85cc20ef0 --- /dev/null +++ b/crates/swc_typescript/Cargo.toml @@ -0,0 +1,11 @@ +[package] +authors = ["강동윤 "] +description = "Proc macro for performance trace of swc" +documentation = "https://rustdoc.swc.rs/swc_trace_macro/" +edition = "2021" +license = "Apache-2.0" +name = "swc_typescript" +repository.workspace = true +version = "0.1.0" + +[dependencies] diff --git a/crates/swc_typescript/src/lib.rs b/crates/swc_typescript/src/lib.rs new file mode 100644 index 00000000000..7d12d9af819 --- /dev/null +++ b/crates/swc_typescript/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: usize, right: usize) -> usize { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +}