This commit is contained in:
Moritz Bischof
2020-12-19 03:58:35 +01:00
parent 48e805177f
commit e52c81470c
10 changed files with 41 additions and 46 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
#![allow(dead_code)]
use serde::Serialize;
use ts_rs::{TS, export};
use ts_rs::{export, TS};
#[derive(Serialize, TS)]
#[ts(rename_all = "lowercase")]
@@ -44,9 +44,9 @@ mod export_ts {
}
}
// this will export [Role] to `role.ts` and [User] to `user.ts`.
// this will export [Role] to `role.ts` and [User] to `user.ts`.
// `export!` will also take care of including imports in typescript files.
export! {
Role => "role.ts",
User => "user.ts",
}
}