add docstring to forEditorField

This commit is contained in:
Damien Elmes 2021-03-29 18:13:45 +10:00
parent efb8a4e61c
commit 188a8891fd

View file

@ -92,6 +92,10 @@ export function getEditorField(n: number): EditorField | null {
return (fields[n] as EditorField) ?? null;
}
/// forEachEditorFieldAndProvidedValue:
/// Values should be a list with the same length as the
/// number of fields. Func will be called with each field and
/// value in turn.
export function forEditorField<T>(
values: T[],
func: (field: EditorField, value: T) => void