Skip to content

action type definition improvement#91

Open
aschiavon91 wants to merge 1 commit intoschrockwell:mainfrom
aschiavon91:main
Open

action type definition improvement#91
aschiavon91 wants to merge 1 commit intoschrockwell:mainfrom
aschiavon91:main

Conversation

@aschiavon91
Copy link
Copy Markdown

@aschiavon91 aschiavon91 commented Dec 28, 2024

Hi, firstly, thanks for awesome work!

I do like to expand the type definition of the action type a little.
I use policies tided to the controller/action, and I do that, configuring bodyguard to call a module/func to retrieve the current controller/action.
It's working pretty nicely, but after I bumped one of my projects to elixir 1.18, elixir-ls starts complaining about the expected type in the authorize callback.
image

Maybe, we can change it to any(), but IMHO, it's not necessary because any() make type specs too lazy.

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