Document charCodeAt edge case behavior in first line#63344
Document charCodeAt edge case behavior in first line#63344bwalter007 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Moves NaN edge-case behavior to the first-line description following the pattern established in PR microsoft#60569 for indexOf/lastIndexOf.
|
You need to run |
|
Hi @RyanCavanaugh, I tried to run the baseline update as requested, but I'm running into test infrastructure errors: Error: ENOENT: no such file or directory Steps I followed from CONTRIBUTING.md:
The doc change itself compiled fine and shows up correctly in built/local/lib.es5.d.ts. Since this is just a documentation tweak, would you be able to run baseline-accept on your end? Or if there's something specific I need to configure in my local environment, I'd appreciate the pointer. Thanks! |
|
Just do |
|
Thanks for the help. Tried Test worker encountered unexpected error and was forced to close: The test harness fails before running any tests - can't mount the virtual filesystem. Same result with hereby runtests-parallel. Is there something I'm missing in the local setup? The change compiled fine to |
|
I don't know what's going on; never heard of this happening before. Even after running |
Similar to PR #60569 which improved indexOf documentation, this moves the NaN edge case behavior to the first line of the JSDoc for better visibility in IDE tooltips.
Before:
After:
The edge case was mentioned in the @param tag but not in the main description. Moving it to the first line makes it immediately visible when hovering over the method in editors, matching the pattern used for indexOf/lastIndexOf.
Note: I noticed there might be other methods in the lib files with similar patterns (edge cases mentioned only in @param tags rather than the first-line description). Would you like me to search for and fix those as well in a follow-up? Happy to expand this if it would be helpful, or keep it minimal if you prefer.