Skip to content

Comments

default handler#2

Open
freemountain wants to merge 5 commits intomicro-js:masterfrom
freemountain:master
Open

default handler#2
freemountain wants to merge 5 commits intomicro-js:masterfrom
freemountain:master

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