Skip to content
Snippets Groups Projects
Commit 8a4ef015 authored by Alexander Rose's avatar Alexander Rose
Browse files

added StructureElement.set

parent 67f3f3fd
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,12 @@ namespace StructureElement {
return { kind: 'element-location', unit: unit!, element: element || (0 as ElementIndex) };
}
export function set(a: StructureElement, unit?: Unit, element?: ElementIndex): StructureElement {
if (unit) a.unit = unit
if (element !== undefined) a.element = element
return a;
}
// TODO: when nominal types are available, make this indexed by UnitIndex
export type Set = SortedArray<ElementIndex>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment