inteface method extension angular

The solution for “inteface method extension angular” can be found here. The following code will assist you in solving the problem.

interface ArrayConstructor {
sortAlphaNumeric: (data: Array) => Array;
};

Array.sortAlphaNumeric = function (data): Array {
return data.sort((a, b) => {
return a.AreaName.toLowerCase().localeCompare(b.AreaName.toLowerCase(), undefined, {
numeric: true,
sensitivity: ‘base’
});
});
}

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in