Skip to content

Commit 99e2219

Browse files
author
Kanchalai Tanglertsampan
committed
Remove unused function
1 parent 5b4dfcc commit 99e2219

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/compiler/core.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,6 @@ namespace ts {
2323
// More efficient to create a collator once and use its `compare` than to call `a.localeCompare(b)` many times.
2424
export const collator: { compare(a: string, b: string): number } = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator() : undefined;
2525

26-
/**
27-
* Use this function instead of calling "String.prototype.localeCompre". This function will preform appropriate check to make sure that
28-
* "typeof Intl" is correct as there are reported issues #11110 nad #11339.
29-
* @param a reference string to compare
30-
* @param b string to compare against
31-
* @param locales string of BCP 47 language tag or an array of string of BCP 47 language tag
32-
* @param options an object of Intl.CollatorOptions to specify localeCompare properties
33-
*/
34-
export function localeCompare(a: string, b: string, locales?: string | string[], options?: Intl.CollatorOptions): number | undefined {
35-
if (collator && String.prototype.localeCompare) {
36-
return a.localeCompare(b, locales, options);
37-
}
38-
return undefined;
39-
}
40-
4126
export function createMap<T>(template?: MapLike<T>): Map<T> {
4227
const map: Map<T> = createObject(null); // tslint:disable-line:no-null-keyword
4328

0 commit comments

Comments
 (0)