inteface method extension angular

Solutions on MaxInterview for inteface method extension angular by the best coders in the world

showing results for - "inteface method extension angular"
Marlene
25 Mar 2017
1interface ArrayConstructor {
2    sortAlphaNumeric: (data: Array<any>) => Array<any>;
3};
4
5Array.sortAlphaNumeric = function (data): Array<any> {
6    return data.sort((a, b) => {
7        return a.AreaName.toLowerCase().localeCompare(b.AreaName.toLowerCase(), undefined, {
8            numeric: true,
9            sensitivity: 'base'
10        });
11    });
12}