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

default functions should be optional #302

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

patrickomeara
Copy link

@patrickomeara patrickomeara commented Jun 22, 2022

The main thing I wanted out of this PR was making the default functions optional. I then started correcting the logic based on Laravel's logic and adding types.

I've used unkown here as we don't know what is going to be returned. I've also copied laravel unless method. It and when take the value as the second argument in the closures, so we effectively don't know what will be returned.

After looking through the code and working on a few PRs I think this package needs to be rewritten in TS. I'm happy to help out as I use this package quite a bit. Writing in typescript will remove disconnect between the javascript and the type definitions.

Let's discuss what's possible @ecrmnn

@ecrmnn
Copy link
Owner

ecrmnn commented Jul 5, 2022

Hi, @patrickomeara

Thanks for your feedback and contribution 😄
I'll have a closer look once I get the time.

I appreciate your work on types and would encourage you to make more contributions on this 🙌

It would be great to transition towards TS, but personally I don't have the time and therefore no intention to rewrite the package to TS.

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.

None yet

2 participants