---
meta:
 - name: keywords
   description: api typescript node.js documentation IgnoreCallback interface
---
# IgnoreCallback - @tsed/schema

## Usage

```typescript
import { IgnoreCallback } from "@tsed/schema";
```

> See [/packages/specs/schema/src/interfaces/IgnoreCallback.ts](https://github.com/tsedio/tsed/blob/v8.28.2/packages/specs/schema/src/interfaces/IgnoreCallback.ts#L0-L0).

## Overview

```ts
interface IgnoreCallback {
    (value: boolean, ctx: JsonHookContext): boolean;
}
```

<!-- Description -->

## Description

Callback function to determine whether a property should be ignored during serialization.

This callback is invoked during schema generation to conditionally ignore properties
based on the current context and the default ignore value.

### Usage

```typescript
const ignoreCallback: IgnoreCallback = (value, ctx) => {
  // Ignore properties when specific groups are active
  if (ctx.groups?.includes('admin')) {
    return false; // Don't ignore for admin group
  }
  return value; // Use default ignore value
};
```

<!-- Members -->

##

```ts
(value: boolean, ctx: JsonHookContext): boolean;
```
