diff --git a/examples/stable/test/end_to_end/candid_rpc/stable_structures/package-lock.json b/examples/stable/test/end_to_end/candid_rpc/stable_structures/package-lock.json index 747ddfb293..b9d4718621 100644 --- a/examples/stable/test/end_to_end/candid_rpc/stable_structures/package-lock.json +++ b/examples/stable/test/end_to_end/candid_rpc/stable_structures/package-lock.json @@ -8,12 +8,18 @@ "azle": "0.24.1" }, "devDependencies": { - "stable_structures_end_to_end_test_functional_syntax": "file:../../functional_syntax/stable_structures" + "stable_structures_end_to_end_test_functional_syntax": "file:../../../../../experimental/test/end_to_end/candid_rpc/stable_structures" + } + }, + "../../../../../experimental/test/end_to_end/candid_rpc/stable_structures": { + "dev": true, + "dependencies": { + "azle": "0.24.1" } }, "../../functional_syntax/stable_structures": { "name": "stable_structures_end_to_end_test_functional_syntax", - "dev": true, + "extraneous": true, "dependencies": { "azle": "0.24.1" } @@ -2005,7 +2011,7 @@ "integrity": "sha512-rijcxtwx2b4Bje3sqeIqw5EeW7UlOIC4YfOdwqIKacpvRQ/D78bWg/4/0m5e0U91oKvlGh7LlJuZCu07ISCC7w==" }, "node_modules/stable_structures_end_to_end_test_functional_syntax": { - "resolved": "../../functional_syntax/stable_structures", + "resolved": "../../../../../experimental/test/end_to_end/candid_rpc/stable_structures", "link": true }, "node_modules/stream-buffers": { diff --git a/src/lib/stable/stable_structures/stable_b_tree_map.ts b/src/lib/stable/stable_structures/stable_b_tree_map.ts index 6b6d4e22c4..bbb575401a 100644 --- a/src/lib/stable/stable_structures/stable_b_tree_map.ts +++ b/src/lib/stable/stable_structures/stable_b_tree_map.ts @@ -30,9 +30,6 @@ export class StableBTreeMap { globalThis._azleIcStable.stableBTreeMapInit(memoryId); } } - - isSerializable(keySerializable); - isSerializable(valueSerializable); } /** @@ -62,6 +59,7 @@ export class StableBTreeMap { encodedKey ); } + /** * Retrieves the value stored at the provided key. * @param key the location from which to retrieve. @@ -321,13 +319,3 @@ export class StableBTreeMap { }); } } - -function isSerializable(obj: any): asserts obj is Serializable { - if (obj.toBytes === undefined) { - throw new Error(`value must have a toBytes method`); - } - - if (obj.fromBytes === undefined) { - throw new Error(`value must have a fromBytes method`); - } -}