Skip to content

Commit 38c3279

Browse files
authored
Document charCodeAt edge case behavior in first line (#63344)
1 parent 7b8cb3b commit 38c3279

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/lib/es5.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ interface String {
400400
charAt(pos: number): string;
401401

402402
/**
403-
* Returns the Unicode value of the character at the specified location.
404-
* @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
403+
* Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds.
404+
* @param index The zero-based index of the desired character.
405405
*/
406406
charCodeAt(index: number): number;
407407

tests/baselines/reference/completionsStringMethods.baseline

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@
209209
],
210210
"documentation": [
211211
{
212-
"text": "Returns the Unicode value of the character at the specified location.",
212+
"text": "Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds.",
213213
"kind": "text"
214214
}
215215
],
@@ -226,7 +226,7 @@
226226
"kind": "space"
227227
},
228228
{
229-
"text": "The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.",
229+
"text": "The zero-based index of the desired character.",
230230
"kind": "text"
231231
}
232232
]

0 commit comments

Comments
 (0)