fix(gen): replace named function with anonymous