Adding function type to optional annotations