Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added closure arg types to Cache/CachedValue documentation #418

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

jskupsik
Copy link
Contributor

@jskupsik jskupsik commented Nov 8, 2024

Just a documentation change - each of these closures had a different signature and I was getting confused.

The Groovy @ClosureParams annotation is more suited for adding type hints to method parameters than to fields, it did not seem to work here.

I settled for a custom but hopefully self-evident syntax of { Type1, Type2, ... -> ReturnType1 | ReturnType2 | .... } in the field comment to explain/remind the user what closure to use in that spot.

@jskupsik jskupsik requested a review from lbwexler November 8, 2024 21:17
@lbwexler
Copy link
Member

Great Jakub -- Really appreciate the innovation here. Clear improvement -- I am a fan and will adopt.

@lbwexler lbwexler merged commit 7d740e7 into develop Nov 11, 2024
4 checks passed
@lbwexler lbwexler deleted the cacheClosureParamDocs branch November 11, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants