Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
set compareWith(fn: (o1: any, o2: any) => boolean) {
/* tslint:disable-next-line:strict-type-predicates */
if (typeof fn !== 'function') {
throw getMcSelectNonFunctionValueError();
}
this._compareWith = fn;
if (this.selectionModel) {
// A different comparator means the selection could change.
this.initializeSelection();
}
}
set compareWith(fn: (o1: any, o2: any) => boolean) {
/* tslint:disable-next-line:strict-type-predicates */
if (typeof fn !== 'function') {
throw getMcSelectNonFunctionValueError();
}
this._compareWith = fn;
if (this.selectionModel) {
// A different comparator means the selection could change.
this.initializeSelection();
}
}
set compareWith(fn: (o1: any, o2: any) => boolean) {
/* tslint:disable-next-line:strict-type-predicates */
if (typeof fn !== 'function') {
throw getMcSelectNonFunctionValueError();
}
this._compareWith = fn;
if (this.selectionModel) {
// A different comparator means the selection could change.
this.initializeSelection();
}
}
set compareWith(fn: (o1: any, o2: any) => boolean) {
/* tslint:disable-next-line:strict-type-predicates */
if (typeof fn !== 'function') {
throw getMcSelectNonFunctionValueError();
}
this._compareWith = fn;
if (this.selectionModel) {
// A different comparator means the selection could change.
this.initializeSelection();
}
}