chore: Add a crate swc_typescript (#9085)

**Description:**

This crate will be used for TypeScript Isolated Declaration support
This commit is contained in:
Donny/강동윤 2024-06-21 12:45:53 +09:00 committed by GitHub
parent 810461eaa7
commit 56f128fc03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 30 additions and 0 deletions

4
Cargo.lock generated
View File

@ -5296,6 +5296,10 @@ dependencies = [
"serde_json",
]
[[package]]
name = "swc_typescript"
version = "0.1.0"
[[package]]
name = "swc_visit"
version = "0.5.14"

View File

@ -23,6 +23,7 @@ members = [
"crates/swc_xml",
"crates/swc_x_optimizer",
"crates/swc_transform_common",
"crates/swc_typescript",
]
resolver = "2"

View File

@ -0,0 +1,11 @@
[package]
authors = ["강동윤 <kdy1997.dev@gmail.com>"]
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]

View File

@ -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);
}
}