I'm still learning how to do TDD with a strongly typed language like typescript. One of the problems I ran into is that although using interfaces makes it easy to quickly create test fakes, if those interfaces grow as you add more functionality, those tests become fragile as the fakes keep needing to be updated with additional methods/attributes that are irrelevant to most of the tests. So I think the solution is to have multiple small interfaces for specific behaviors and have my concrete objects just implement multiple interfaces.

However, the problem is now that I want to keep a collection of generic objects, but find within this collection, an object that implements a specific interface that also passes some condition.

In my case, I have entities that implement the `Entity` interface. Some entities can be interacted with, and these also implement the `Interactable` interface.

I have a type predicate for `Interactable` defined as such:

```
function isInteractable(entity: any): entity is Interactable {
    return "getInteractHint" in entity;
}

```

Say I have an array of entities, and a condition I need the entity to fulfil:

```
const entities: Entity[] = [ ... ]

const condition = (entity: Entity): boolean => ...some test...

```

I want to do something like:

```
getInteractable(entities: Entity[]): Interactable | undefined {
    return entities.filter(isInteractable).find(condition);
}

```

But the problem is that that isn't enough to cast the result to `Interactable` or `Entity & Interactable`; Typescript will complain that an object of type `Entity` doesn't implement `Interactable`.

I'm left with this horrible construction to make sure that I get the right types out at the end:

```
type InteractableEntity = Entity & Interactable;
type InteractablesOrNull = InteractableEntity | null;
const castEntities: InteractablesOrNull[] = ctx.entities.map(e => {
    if (isInteractable(e)) {
        return e;
    }
    else {
        return null
    }
});
const filteredInteractables: InteractableEntity[] = castEntities.filter(e => e !== null);

return filteredInteractables.find(condition);

```

The intermediate objects here make the code a lot harder to read.

What is a better, more consise, way of doing this?