Skip to content

Commit 3a74821

Browse files
committed
Fix ts-rs type name collision and tsc error
1 parent 48f06a2 commit 3a74821

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

rust/kcl-lib/src/execution/geometry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@ impl SketchVarId {
16691669
}
16701670

16711671
#[derive(Debug, Clone, Serialize, PartialEq, ts_rs::TS)]
1672-
#[ts(export)]
1672+
#[ts(export_to = "Geometry.ts")]
16731673
#[serde(rename_all = "camelCase")]
16741674
pub struct SketchVar {
16751675
pub id: SketchVarId,

src/components/ModelingSidebar/ModelingPanes/MemoryPane.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ export function processMemory(variables: VariableMap) {
103103
} else if (val.type === 'Number') {
104104
processedMemory[key] = humanDisplayNumber(val.value, val.ty)
105105
} else if (val.type === 'SketchVar') {
106-
processedMemory[key] = `var ${humanDisplayNumber(val.value, val.ty)}`
106+
const sketchVar = val.value
107+
processedMemory[key] =
108+
`var ${humanDisplayNumber(sketchVar.initialValue, sketchVar.ty)}`
107109
} else {
108110
processedMemory[key] = val.value
109111
}

0 commit comments

Comments
 (0)