Instead of returning a BFTask
with no generic type, or a generic type of 'NSNull' when there is no usable result from a task, we use the type 'BFVoid', which will always have a value of nil
.
This allows you to provide a more enforced API contract to the caller, as sending any message to BFVoid
will result in a compile time error.
Thank you @richardjrossiii for this hack, it simplifies a lot of boilerplate. Also cc @gotemb as it would allow enforcing a lot of API contracts for you.