I have an array :

```
main = [{
           data: x,
           numberField:  1;
 }, {      data: y,
           numberField:  2;
 }, {      data: x,
           numberField:  3;
 },
  {        data:z
           numberField:  4;
 },
    {      data: q
           numberField:  5;
 }]
fixedElements = [ 3, 5]

```

I need to have :

```
 fixedElements .includes(a.numberField) - fixedElements .includes(b.numberField) 

```

Because I need to check whether two coming values are in the array a and not sort them, but sort the rest.
when I try to do this typescript throws an error 

```
  left/right hand-side of the argument needs to be of type any or number.

```

My initial sort function as :

```
  sort(a,b) {
  if(a.numberField > b.numberField)
       return -1

  if(a.numberField < b.numberField)
     return 1;

    }

```

So I wanted to check whether the coming a or b are in the fixedElements array, and leave them last. Is there any other way to do this?