Export getEditorField and forEditorField

This commit is contained in:
Henrik Giesel 2021-01-31 20:56:28 +01:00
parent df1b6976eb
commit 48b276cacc

View file

@ -551,12 +551,12 @@ function adjustFieldAmount(amount: number): void {
} }
} }
function getEditorField(n: number): EditorField | null { export function getEditorField(n: number): EditorField | null {
const fields = document.getElementById("fields").children; const fields = document.getElementById("fields").children;
return (fields[n] as EditorField) ?? null; return (fields[n] as EditorField) ?? null;
} }
function forEditorField<T>( export function forEditorField<T>(
values: T[], values: T[],
func: (field: EditorField, value: T) => void func: (field: EditorField, value: T) => void
): void { ): void {