---
title: "Break(): function in Authoring, TypeShade API reference"
description: "Break, a function in Authoring. Push a break; onto the innermost scope, exiting the nearest enclosing Loop outright, under the same nesting rule as Continue…"
url: https://typeshade.dev/api/break/
language: en
---

# `Break()`

Function in Authoring

Push a break; onto the innermost scope, exiting the nearest enclosing Loop outright, under the same nesting rule as Continue: an If nested inside the loop is not itself a break boundary.

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

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

## Syntax

```ts
const Break: () => void
```

## Return value

`void`

## Examples

### Example

```ts
Loop(u32(0), (i) => i.lt(u32(72)), () => {
  const d = Let(length(p).sub(1))
  If(d.lt(0.001), () => Break()) // hit: stop marching
})
```

## See also

- [`Continue`](https://typeshade.dev/api/continue/)
- [`Loop`](https://typeshade.dev/api/loop/)

## Source

[`src/core/ir/builder.ts`, line 1473](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/builder.ts#L1473), at commit af54ddad5
