intuit / intuit/hooks

Waterfall hooks to accept receiver as return type

Open
#38 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Kotlin
Stars
42
Forks
6
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

Currently, you'll get a validation error for the following:
```kotlin
@SyncWaterfall A>
val hook: Hook
```
> `Waterfall hooks must specify the same types for the first parameter and the return type`

**Describe the solution you'd like**

Receivers are just syntactic sugar for first parameters, so it'd be cool to accept the receiver as the accumulator type for a waterfall hook.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.