---
lang: en
title: 'API docs: filter.wherebuilder.cast'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/filter
permalink: /doc/en/lb4/apidocs.filter.wherebuilder.cast.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/filter](./filter.md) &gt; [WhereBuilder](./filter.wherebuilder.md) &gt; [cast](./filter.wherebuilder.cast.md)

## WhereBuilder.cast() method

> Warning: This API is now obsolete.
> 
> Starting from TypeScript 3.2, we don't have to cast any more. This method should be considered as `deprecated`<!-- -->.
> 
> Cast an `and`<!-- -->, `or`<!-- -->, or condition clause to Where
> 

<b>Signature:</b>

```typescript
cast(clause: AndClause<MT> | OrClause<MT> | Condition<MT>): Where<MT>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  clause | [AndClause](./filter.andclause.md)<!-- -->&lt;MT&gt; \| [OrClause](./filter.orclause.md)<!-- -->&lt;MT&gt; \| [Condition](./filter.condition.md)<!-- -->&lt;MT&gt; | And/Or/Condition clause |

<b>Returns:</b>

[Where](./filter.where.md)<!-- -->&lt;MT&gt;


