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

Use shorter syntax in README example #167

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amomchilov
Copy link

Just from a quick glance at the README, it's not obvious that there's a shorter single-line syntax that could be used instead of the multiple # @rbs name: Type lines.

When I showed this repo to several coworkers, they all got the mistaken impression that the signitures have to be multiple lines like JavaDoc or JSDoc.

To fix this, I suggest we highlight the short syntax in the first and main example.

Optionally, we could add another method as an example of the longer syntax, showing how it can be useful for methods with many parameters and/or long types, like this one:

# @rbs node: Prism::CallNode
# @rbs comments: AnnotationParser::ParsingResult?
# @rbs application: Annotations::Application?
# @rbs return: void
def initialize: (Prism::CallNode node, AnnotationParser::ParsingResult? comments, Annotations::Application? application) -> void

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.

1 participant