feat(arch): add new typedef for stream and simple result

This commit is contained in:
Hugo Pointcheval 2022-11-10 22:58:19 -05:00
parent 4183da6259
commit 3de7d01173
Signed by: hugo
GPG Key ID: A9E8E9615379254F
2 changed files with 3 additions and 0 deletions

View File

@ -18,6 +18,8 @@ import 'package:wyatt_architecture/src/core/exceptions/exceptions.dart';
import 'package:wyatt_type_utils/wyatt_type_utils.dart'; import 'package:wyatt_type_utils/wyatt_type_utils.dart';
typedef FutureResult<T> = Future<Result<T, AppException>>; typedef FutureResult<T> = Future<Result<T, AppException>>;
typedef StreamResult<T> = Stream<Result<T, AppException>>;
typedef Res<T> = Result<T, AppException>;
// ignore: one_member_abstracts // ignore: one_member_abstracts
abstract class UseCase<Parameters, ReturnType> { abstract class UseCase<Parameters, ReturnType> {

View File

@ -14,4 +14,5 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
export 'no_param.dart';
export 'usecase.dart'; export 'usecase.dart';