---
title: "discard: constant in the TypeShade language reference"
description: "discard, a constant in the TypeShade language reference. Discards the current fragment, so nothing is written for it."
url: https://typeshade.dev/reference/constants/discard/
language: en
---

# `discard`

Constant

Discards the current fragment, so nothing is written for it.

The signature, the sentence and any message are the compiler's own text at commit af54ddad5.

## Syntax

```ts
declare const discard: void
```

## Description

Allowed in a fragment entry and in a helper that only fragment entries reach; compiles to `discard;` on both targets.

## Examples

- [`gallery/cutout/cutout.shade.ts`](https://typeshade.dev/guide/examples/cutout/)

## See also

- [Constants](https://typeshade.dev/reference/constants/)
