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 handler #2

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

Conversation

freemountain
Copy link

This PR adds support for a default handler in object descriptors, feel free to merge it 😀

I choose 'default' as keyname, because it acts like the default branch in a switch statement, but i am not sure whether a reserved keyword is a good name.

@ashaffer
Copy link
Member

Hmm...so right now I had been using arrays to cover this case: [{enter: submit}, updateText]. Are you adding this default so that you can avoid calling the alternative case in the cases covered by the existing keys?

And ya, I think it is probably inadvisable to use default even though it's really the right term. Maybe others, rest, or *?

Thx for the PR!

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.

2 participants