Skip to content
This repository was archived by the owner on Jun 24, 2026. It is now read-only.

Commit 6de5618

Browse files
feat: update @ratiosolver/coco version to 0.0.84 in package.json and package-lock.json; adjust types in coco.ts for better type safety
1 parent 3d23bf7 commit 6de5618

5 files changed

Lines changed: 14 additions & 10 deletions

File tree

gui/app/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gui/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"vite": "^6.2.0"
1515
},
1616
"dependencies": {
17-
"@ratiosolver/coco": "^0.0.83",
17+
"@ratiosolver/coco": "^0.0.84",
1818
"@ratiosolver/flick": "^0.1.12",
1919
"@ratiosolver/solver": "^0.0.42",
2020
"bootstrap": "^5.3.6"

gui/coco/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gui/coco/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ratiosolver/coco",
3-
"version": "0.0.83",
3+
"version": "0.0.84",
44
"type": "module",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

gui/coco/src/coco/coco.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,11 @@ export namespace coco {
189189
let value = undefined;
190190
if (itm.value)
191191
value = { data: itm.value.data, timestamp: new Date(itm.value.timestamp) };
192-
return new taxonomy.Item(id, new Set(itm.types.map(tn => this.types.get(tn)!)), itm.properties, value, (itm as any).slots);
192+
const types: Set<taxonomy.Type> = new Set();
193+
if (itm.types)
194+
for (const tn of itm.types)
195+
types.add(this.get_type(tn)!);
196+
return new taxonomy.Item(id, types, itm.properties, value, (itm as any).slots);
193197
}
194198

195199
get_type(name: string): taxonomy.Type { return this.types.get(name)!; }
@@ -804,7 +808,7 @@ interface ValueMessage {
804808
}
805809

806810
interface ItemMessage {
807-
types: string[];
811+
types?: string[];
808812
properties?: Record<string, unknown>;
809813
value?: ValueMessage;
810814
}

0 commit comments

Comments
 (0)