@welldot/utils

getConstructivePropertySummary

Extracts the value of an arbitrary property from every item in all constructive component arrays (borehole, holefill, surfacecase, wellscreen, wellcase, reduction).

getConstructivePropertySummary<T>(constructionData, property): T

Extracts the value of an arbitrary property from every item in all constructive component arrays (bore_hole, hole_fill, surface_case, well_screen, well_case, reduction).

Useful for gathering a summary list of a single attribute — e.g. all type strings or all description values — across the entire constructive section in one pass.

Type Parameters

T

T

Expected type of the extracted property values.

Parameters

constructionData

Partial<Constructive>

The constructive section of a well. Accepts a partial so callers can pass incomplete objects safely.

property

string

Name of the property to extract from each item.

Returns

T

Flat array of the extracted values in component order.