adsense

Saturday, September 9, 2023

Return several types from a single method

 As  a backend developer, I found OneOf package is pretty useful in returning several types from a one method.

With OneOf  you van return,

  • objects
  • validation errors
  • and  try..catch errors

 from the service.

You can download OneOf package here and read more about usage here.

Regards,

Samitha


As a backend developer, I have primarily used this package to return the objects, validation errors, and try..catch errors from the service.

No comments:

Post a Comment