Description 📝
There are methods that do not share the same signature between FragmentsModel / SingleThreadedFragmentsModel.
This is undesirable, making the writing of helper functions accepting a model arg awkward.
export async function hashItemsWithGeometry(
model: SingleThreadedFragmentsModel | FragmentsModel,
precision = GEOMETRY_FLOATING_POINT_PRECISION
) {
const value: number[] | Item[] = await model.getItemsWithGeometry(); // awkward
await model.getItemsIdsWithGeometry(); // doesn't exist on SingleThreadedFragmentsModel, viable solution if exists
}
Suggested solution 💡
Consolidate signatures so that both classes have an identical (or almost identical) interface (I think SingleThreadedFragmentsModel can remain sync though)
Alternative ⛕
I could use instanceof to differentiate between the 2
Additional context ☝️
No response
Validations ✅
Description 📝
There are methods that do not share the same signature between
FragmentsModel/SingleThreadedFragmentsModel.This is undesirable, making the writing of helper functions accepting a
modelarg awkward.Suggested solution 💡
Consolidate signatures so that both classes have an identical (or almost identical) interface (I think
SingleThreadedFragmentsModelcan remain sync though)Alternative ⛕
I could use instanceof to differentiate between the 2
Additional context ☝️
No response
Validations ✅