mirror of
https://github.com/swc-project/swc.git
synced 2024-11-23 00:32:15 +03:00
chore: Add a crate swc_typescript
(#9085)
**Description:** This crate will be used for TypeScript Isolated Declaration support
This commit is contained in:
parent
810461eaa7
commit
56f128fc03
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -5296,6 +5296,10 @@ dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "swc_typescript"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "swc_visit"
|
||||
version = "0.5.14"
|
||||
|
@ -23,6 +23,7 @@ members = [
|
||||
"crates/swc_xml",
|
||||
"crates/swc_x_optimizer",
|
||||
"crates/swc_transform_common",
|
||||
"crates/swc_typescript",
|
||||
]
|
||||
resolver = "2"
|
||||
|
||||
|
11
crates/swc_typescript/Cargo.toml
Normal file
11
crates/swc_typescript/Cargo.toml
Normal 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]
|
14
crates/swc_typescript/src/lib.rs
Normal file
14
crates/swc_typescript/src/lib.rs
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user