Skip to content

Conversation

ameliavoncat
Copy link
Contributor

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

documentation

Description of changes

Adds missing argument types to the docs for event methods

Issue

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. events Issues and PRs related to the events subsystem / EventEmitter. labels Mar 11, 2017
Copy link
Contributor

@mscdex mscdex Mar 11, 2017

Choose a reason for hiding this comment

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

The type here isn't correct. It can be zero or more of any kind of values. I'm not sure if we've yet "standardized" on what term to use as an 'any' type.

Copy link
Contributor

Choose a reason for hiding this comment

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

We're more lax than this. We basically accept any value, it's just that (currently) it will be converted to a string before being used. So for example numbers, booleans, functions (the function's source will be used as the event name), etc. all work.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it may make more sense to be more specific here and say 'integer.'

@ameliavoncat ameliavoncat force-pushed the events-argument-types branch from 81c7f32 to f581702 Compare March 11, 2017 16:20
@mscdex
Copy link
Contributor

mscdex commented Mar 12, 2017

LGTM

jasnell pushed a commit that referenced this pull request Mar 15, 2017
Refs: #9399
PR-URL: #11802
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Brian White <[email protected]>
@jasnell
Copy link
Member

jasnell commented Mar 15, 2017

Landed in 38ba0c2. Thank you! :-)

@jasnell jasnell closed this Mar 15, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Mar 20, 2017
Refs: nodejs#9399
PR-URL: nodejs#11802
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Brian White <[email protected]>
jungx098 pushed a commit to jungx098/node that referenced this pull request Mar 21, 2017
Refs: nodejs#9399
PR-URL: nodejs#11802
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Brian White <[email protected]>
@MylesBorins
Copy link
Contributor

This does not land cleanly in LTS. Please feel free to manually backport. Please also feel free to replace the backport request label with do-not-land if it shouldn't land

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. events Issues and PRs related to the events subsystem / EventEmitter.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants