Skip to content

Commit a73f667

Browse files
committed
Export types with TS-RS
1 parent b7eae2d commit a73f667

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rust/src/core.rs

+3
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@ use serde::{Deserialize, Serialize};
33
use ts_rs::TS;
44

55
#[derive(Debug, Serialize, Deserialize, TS)]
6+
#[ts(export)]
67
pub struct Piece {
78
pub composer: String,
89
pub title: String,
910
}
1011

1112
#[derive(Debug, Serialize, Deserialize, TS)]
13+
#[ts(export)]
1214
pub struct Performer {
1315
pub name: String,
1416
pub instrument: Option<String>,
1517
}
1618

1719
#[derive(Debug, Serialize, Deserialize, TS)]
20+
#[ts(export)]
1821
pub struct Concert {
1922
pub datetime: DateTime<Utc>,
2023
pub url: String,

0 commit comments

Comments
 (0)