add docstring to forEditorField

This commit is contained in:
Damien Elmes 2021-03-29 18:13:45 +10:00
parent 0e4bcbd69b
commit ddcb2adf71

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