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

Add support for options param in params type signature #12

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

olivier-thatch
Copy link
Contributor

E.g.

  params :order do |options|
    optional :order_by, type: Symbol, values: options[:order_by], default: options[:default_order_by]
    optional :order, type: Symbol, values: %i(asc desc), default: options[:default_order]
  end

this update properly types options as T::Hash[Symbol, T.untyped].

@olivier-thatch olivier-thatch merged commit 4de51f1 into main Jul 16, 2024
6 checks passed
@olivier-thatch olivier-thatch deleted the olivier-rbi-params-options branch July 16, 2024 00:04
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