doc: argument types for assert methods#11548
doc: argument types for assert methods#11548ameliavoncat wants to merge 1 commit intonodejs:masterfrom
Conversation
doc/api/assert.md
Outdated
There was a problem hiding this comment.
There is already usage of {any} which seems to fit this situation better. Ditto below.
doc/api/assert.md
Outdated
There was a problem hiding this comment.
The documentation doesn't mention how anything other than a RegExp or a Function (either a constructor or a validation function) would work. I.e., I don't think it can be an Error object, only an Error constructor. Ditto for .throws().
doc/api/assert.md
Outdated
There was a problem hiding this comment.
Well, technically any value (not just booleans and numbers) would work. I'd be fine with either any or Boolean. since the concepts of truthy-ness and falsy-ness are defined by Boolean(val).
doc/api/assert.md
Outdated
There was a problem hiding this comment.
Any type would work with this function. The examples below are just that -- examples.
73fbc20 to
9b5d9e8
Compare
|
Thanks for the review - changes made. |
doc/api/assert.md
Outdated
There was a problem hiding this comment.
Nit: can you please remove these spurious/extra new lines?
9b5d9e8 to
7c9b677
Compare
doc/api/assert.md
Outdated
There was a problem hiding this comment.
I think this is actually any given the description below...
doc/api/assert.md
Outdated
There was a problem hiding this comment.
Should be any, like assert.ok
7c9b677 to
1550375
Compare
1550375 to
d1b6dd3
Compare
|
Landed in 76e3e49 |
Refs: nodejs#9399 PR-URL: nodejs#11548 Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Checklist
Affected core subsystem(s)
documentation
Description of changes
Added argument data types to the docs for the
assertmodule.Issue