* add some typings to utils * add typing of flattenChildren * more accurate typings for flattenChildren