| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Integer needs to be fixed as well
Sorry, something went wrong.
There was a problem hiding this comment.
Integer is not a valid type. Shall we change them all to number?
Sorry, something went wrong.
There was a problem hiding this comment.
I think it would make sense to be specific to keep Integer here because it doesn’t really make sense to pass in non-integer numbers here… the upper-casing is a bit weird but I’d be okay with it, as long as we try to be consistent
(also /cc @ameliavoncat whose awesome PRs also touch these parts of the docs and who might want to keep track of this discussion)
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah, I guess it's better to keep it as-is. Per our rule discussed in the last PR, everything except the six primitives should be uppercased.
Sorry, something went wrong.
There was a problem hiding this comment.
@silverwind in your commit that changed the case in the doctool, Integer was changed to integer. Either way it doesn't seem right to me that number and integer have different cases.
Sorry, something went wrong.
There was a problem hiding this comment.
I think I'll move it out of jsPrimitives and into typeMap, possibly linking it to number docs.
Sorry, something went wrong.
There was a problem hiding this comment.
Can you drop the spaces before the colons in this file? We don’t do that anywhere else in the docs
Sorry, something went wrong.
There was a problem hiding this comment.
done
Sorry, something went wrong.
|
@TimothyGu d5d4274 fixes the Integer inconsistency in the doctool. I also added the missing undefined type, which results in a few new links in the doc. I still think we should keep it at Integer because we only lowercase the six primitives. |
Sorry, something went wrong.
But the issue at hand is that an integer is expressed as a number primitive. I also just looked at a proposal in TypeScript to add integral types, and though not yet accepted, it also uses lower cased type name (int). And AFAICT, there isn't any disagreement in that thread about its capitalization. |
Sorry, something went wrong.
|
@TimothyGu okay, lowercased integer. I guess a argument could be made about it not being a valid constructor. It's really a odd type, but I see its value in documentation. |
Sorry, something went wrong.
- fix a number of uppercase types - lowercase 'integer' - consistent formatting in crypto PR-URL: #11697 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
- fix a number of uppercase types - lowercase 'integer' - consistent formatting in crypto PR-URL: nodejs#11697 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
- fix a number of uppercase types - lowercase 'integer' - consistent formatting in crypto PR-URL: nodejs#11697 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
- fix a number of uppercase types - lowercase 'integer' - consistent formatting in crypto PR-URL: nodejs#11697 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
|
Do we want to backport to v6.x? |
Sorry, something went wrong.
|
I'd say it's not strictly necessary, but it could make landing future doc backports easier. Ideally, these commits should be landed in tandem: |
Sorry, something went wrong.
|
@silverwind would you be willing to put together a PR with those commits? |
Sorry, something went wrong.
|
@MylesBorins not right now, I'm busy on other projects. But if you can wait a bit, I can put something together later. |
Sorry, something went wrong.
- fix a number of uppercase types - lowercase 'integer' - consistent formatting in crypto PR-URL: nodejs#11697 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
- fix a number of uppercase types - lowercase 'integer' - consistent formatting in crypto PR-URL: nodejs#11697 Backport-PR-URL: nodejs#13054 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Turns out I missed quite a few types in ff13619 because my sed skills weren't up to par. This commit should fix all remaining issues with primitive type cases.
I also made the syntax with multiple types consistent by removing any whitespace between curly braces. If more people prefer {type | type | type} over {type|type|type}, I can also change to that.
Type replacement was done with:
sed -i -E 's#(\{|\|)\s+?(Boolean|Null|Undefined|Number|String|Symbol)\s+?(\||\})#\1\L\2\3#g' *.md