---
title: "File parsed types"
description: "Context type for the file:parsed hook fired after a file parser runs."
canonical_url: "https://content.comark.dev/reference/types/file-parsed"
---
# File parsed types

> Context type for the file:parsed hook fired after a file parser runs.

```ts
import type { FileParsedContext } from 'comark-content'
```

## `FileParsedContext`

Payload for [`file:parsed`](https://content.comark.dev/reference/content/hooks#fileparsed). Handlers may mutate `file.data`, transform field values, validate against a schema, or set `file` to `null` to reject the document.

```ts
interface FileParsedContext {
  sourceName: string
  source: Source
  file: ContentFile | null
}
```

| Field  | Description                                                                 |
| ------ | --------------------------------------------------------------------------- |
| `file` | The parsed file. Set to `null` to exclude it from the manifest during load. |

The [`markdown-fields`](https://content.comark.dev/plugins/built-in/markdown-fields) and [`schema-validation`](https://content.comark.dev/plugins/built-in/schema-validation) plugins both hook `file:parsed`.


## Sitemap

See the full [sitemap](https://content.comark.dev/sitemap.md) for all pages.
