Skip to content

Commit 5ae2863

Browse files
falsandtruRyanCavanaugh
authored andcommitted
Update String#toLocale{Lower,Upper}Case methods (microsoft#32961)
1 parent 634beb5 commit 5ae2863

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/lib/es5.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,13 +466,13 @@ interface String {
466466
toLowerCase(): string;
467467

468468
/** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
469-
toLocaleLowerCase(): string;
469+
toLocaleLowerCase(locales?: string | string[]): string;
470470

471471
/** Converts all the alphabetic characters in a string to uppercase. */
472472
toUpperCase(): string;
473473

474474
/** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
475-
toLocaleUpperCase(): string;
475+
toLocaleUpperCase(locales?: string | string[]): string;
476476

477477
/** Removes the leading and trailing white space and line terminator characters from a string. */
478478
trim(): string;

tests/baselines/reference/destructuringWithGenericParameter.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ genericFunction(genericObject, ({greeting}) => {
3636
var s = greeting.toLocaleLowerCase(); // Greeting should be of type string
3737
>s : string
3838
>greeting.toLocaleLowerCase() : string
39-
>greeting.toLocaleLowerCase : () => string
39+
>greeting.toLocaleLowerCase : (locales?: string | string[]) => string
4040
>greeting : string
41-
>toLocaleLowerCase : () => string
41+
>toLocaleLowerCase : (locales?: string | string[]) => string
4242

4343
});
4444

tests/baselines/reference/typeGuardsOnClassProperty.types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ if (typeof prop1 === "string" && prop1.toLocaleLowerCase()) { }
106106
>prop1 : string | number
107107
>"string" : "string"
108108
>prop1.toLocaleLowerCase() : string
109-
>prop1.toLocaleLowerCase : () => string
109+
>prop1.toLocaleLowerCase : (locales?: string | string[]) => string
110110
>prop1 : string
111-
>toLocaleLowerCase : () => string
111+
>toLocaleLowerCase : (locales?: string | string[]) => string
112112

0 commit comments

Comments
 (0)