diff --git a/src/compiler/core.ts b/src/compiler/core.ts index e8fadbff6e9..3ca4abc69da 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -23,21 +23,6 @@ namespace ts { // More efficient to create a collator once and use its `compare` than to call `a.localeCompare(b)` many times. export const collator: { compare(a: string, b: string): number } = typeof Intl === "object" && typeof Intl.Collator === "function" ? new Intl.Collator() : undefined; - /** - * Use this function instead of calling "String.prototype.localeCompre". This function will preform appropriate check to make sure that - * "typeof Intl" is correct as there are reported issues #11110 nad #11339. - * @param a reference string to compare - * @param b string to compare against - * @param locales string of BCP 47 language tag or an array of string of BCP 47 language tag - * @param options an object of Intl.CollatorOptions to specify localeCompare properties - */ - export function localeCompare(a: string, b: string, locales?: string | string[], options?: Intl.CollatorOptions): number | undefined { - if (collator && String.prototype.localeCompare) { - return a.localeCompare(b, locales, options); - } - return undefined; - } - export function createMap(template?: MapLike): Map { const map: Map = createObject(null); // tslint:disable-line:no-null-keyword