固定节点偏移量 TypeScript 元组导出
为二维数组字段补充 ts-rs 元组覆盖
This commit is contained in:
@@ -4,7 +4,9 @@ use ts_rs::TS;
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize, TS)]
|
||||
#[ts(export, export_to = concat!(env!("CARGO_MANIFEST_DIR"), "/../src/features/ui-editor/types/"))]
|
||||
pub struct NodeOffset {
|
||||
#[ts(as = "[f32; 2]")]
|
||||
pub min: [f32; 2],
|
||||
#[ts(as = "[f32; 2]")]
|
||||
pub max: [f32; 2],
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user