Issue #2293847 by moshe.weitzman. Added type hints for field generate functions.