@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
70 lines (39 loc) • 1.43 kB
Markdown
---
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) > [@loopback/filter](./filter.md) > [WhereBuilder](./filter.wherebuilder.md) > [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
>
**Signature:**
```typescript
cast(clause: AndClause<MT> | OrClause<MT> | Condition<MT>): Where<MT>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
clause
</td><td markdown="1">
[AndClause](./filter.andclause.md)<!-- --><MT> \| [OrClause](./filter.orclause.md)<!-- --><MT> \| [Condition](./filter.condition.md)<!-- --><MT>
</td><td markdown="1">
And/Or/Condition clause
</td></tr>
</tbody></table>
**Returns:**
[Where](./filter.where.md)<!-- --><MT>