---
title: "insideRange(): IR builder function in typeshade/core/ir"
description: "insideRange, an IR builder function in typeshade/core/ir. In-range predicate: x >= lo && x <= hi."
url: https://typeshade.dev/api/insiderange/
language: en
---

# `insideRange()`

Function in Builtins

In-range predicate: x >= lo && x <= hi.

`import { insideRange } from 'typeshade/core/ir'`

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
const insideRange: (
  x: ReadonlyNode<ScalarKey>,
  lo: ReadonlyNode<ScalarKey> | number,
  hi: ReadonlyNode<ScalarKey> | number,
) => Node<"bool">
```

## Parameters

**`x` `ReadonlyNode<ScalarKey>`**

**`lo` `ReadonlyNode<ScalarKey> | number`**

**`hi` `ReadonlyNode<ScalarKey> | number`**

## Return value

`Node<'bool'>`

## Source

[`src/core/ir/node.ts`, line 2498](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/node.ts#L2498), at commit af54ddad5
