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

Is there a way to define reusable type definitions? #1513

Open
KonnorRogers opened this issue Oct 2, 2023 · 0 comments
Open

Is there a way to define reusable type definitions? #1513

KonnorRogers opened this issue Oct 2, 2023 · 0 comments

Comments

@KonnorRogers
Copy link

KonnorRogers commented Oct 2, 2023

Hi there! I was wondering if there's any way to define a type alias with Yard.

For example in JSDOC i can use @typedef to define a reusable type. Is this possible with Yard?

Example:

# @​typedef [String, nil] NullableString

class MyClass
  # @​param nullOrStr [NullableString]
  def initialize(nullOrStr)
     @​nullOrStr = nullOrStr
  end
end

Thank you for your time! I tried searching through the docs and other issues but couldn't find anything.

I have read the Contributing Guide.

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

No branches or pull requests

1 participant