File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -401,7 +401,7 @@ interface String {
401
401
* same as the corresponding elements of this object (converted to a String) starting at
402
402
* endPosition – length(this). Otherwise returns false.
403
403
*/
404
- endsWith ( searchString : string , endPosition ?: number ) : boolean ;
404
+ endsWith < T extends string > ( searchString : T , endPosition ?: number ) : this is `${ string } ${ T } ` ;
405
405
406
406
/**
407
407
* Returns the String value result of normalizing the string into the normalization form
@@ -431,7 +431,7 @@ interface String {
431
431
* same as the corresponding elements of this object (converted to a String) starting at
432
432
* position. Otherwise returns false.
433
433
*/
434
- startsWith ( searchString : string , position ?: number ) : boolean ;
434
+ startsWith < T extends string > ( searchString : T , position ?: number ) : this is `${ T } ${ string } ` ;
435
435
436
436
/**
437
437
* Returns an `<a>` HTML anchor element and sets the name attribute to the text value
You can’t perform that action at this time.
0 commit comments