# CodeParseResult

Source: /tuil/docs/reference/packages/code/api/code-parse-result
Locale: en

interface exported by @mwillbanks/tuil-code.



{/* Generated by tooling/docs/generate-reference.ts. */}

## interface [#interface]

Public interface exported by `@mwillbanks/tuil-code`.

```ts
export interface CodeParseResult {
  readonly language: string;
  readonly version: number;
  readonly spans: readonly CodeSpan[];
  readonly folds: readonly {
    readonly startLine: number;
    readonly endLine: number;
  }[];
  readonly diagnostics: readonly CodeDiagnostic[];
  readonly incremental?: boolean;
}
```

## Members [#members]

| Member        | Type                                                                             | Required | Description                                                                                                            | Related types                                                         |
| ------------- | -------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `language`    | `string`                                                                         | Yes      | The `language` member uses the `string` contract.                                                                      | —                                                                     |
| `version`     | `number`                                                                         | Yes      | The `version` member uses the `number` contract.                                                                       | —                                                                     |
| `spans`       | `readonly CodeSpan[]`                                                            | Yes      | The `spans` member uses the `readonly CodeSpan[]` contract.                                                            | [`CodeSpan`](/tuil/docs/reference/packages/code/api/code-span)             |
| `folds`       | `readonly &#123; readonly startLine: number; readonly endLine: number; &#125;[]` | Yes      | The `folds` member uses the `readonly &#123; readonly startLine: number; readonly endLine: number; &#125;[]` contract. | —                                                                     |
| `diagnostics` | `readonly CodeDiagnostic[]`                                                      | Yes      | The `diagnostics` member uses the `readonly CodeDiagnostic[]` contract.                                                | [`CodeDiagnostic`](/tuil/docs/reference/packages/code/api/code-diagnostic) |
| `incremental` | `boolean \| undefined`                                                           | No       | The `incremental` member uses the `boolean \| undefined` contract.                                                     | —                                                                     |

## Parameters [#parameters]

This declaration has no public members.

## Returns [#returns]

This declaration does not return a value.

## Throws [#throws]

No thrown errors are documented for this declaration.

## Related types [#related-types]

* [`CodeDiagnostic`](/tuil/docs/reference/packages/code/api/code-diagnostic)
* [`CodeSpan`](/tuil/docs/reference/packages/code/api/code-span)

## Source [#source]

[View the secondary source reference](https://github.com/mwillbanks/tuil/blob/main/packages/code/src/index.ts)

## Package [#package]

[@mwillbanks/tuil-code](/tuil/docs/reference/packages/code)
