Skip to content

Add trivia for partial types #205

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

Merged
merged 4 commits into from
Jun 14, 2018
Merged

Add trivia for partial types #205

merged 4 commits into from
Jun 14, 2018

Conversation

saschanaz
Copy link
Member

Renames a local variable isPartial as partialModifier.

lib/webidl2.js Outdated
@@ -851,7 +851,7 @@
return ret;
}

function interface_rest(isPartial, typeName = "interface") {
function interface_rest(partialModifier = null, typeName = "interface") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd really prefer if this was:

interface_rest(typeName = "interface", { partialModifier = null } ) {

It kills the annoying partialModifier boolean/null trap.

Copy link
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signature of interface_rest could be better.

lib/webidl2.js Outdated
@@ -889,7 +889,7 @@
}
}

function mixin_rest(isPartial) {
function mixin_rest(partialModifier = null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess same applies here.

lib/webidl2.js Outdated
@@ -927,17 +927,17 @@
}
}

function interface_(isPartial) {
function interface_(partialModifier = null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same... and for the others too.

Copy link
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the signatures!

@saschanaz saschanaz merged commit 4cbd414 into develop Jun 14, 2018
@saschanaz saschanaz deleted the trivia-partial branch June 14, 2018 04:19
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