swc_common 0.11.5

Common utilities for the swc project.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use serde::Deserialize;

#[derive(Deserialize)]
pub struct Node<T> {
    #[serde(default, rename = "type")]
    pub ty: String,
    #[serde(flatten)]
    pub node: T,
}

#[derive(Deserialize)]
pub struct Type {
    #[serde(rename = "type")]
    pub ty: String,
}