# DocumentNode

Source: /tuil/docs/reference/packages/streaming/api/document-node
Locale: en

interface exported by @mwillbanks/tuil-streaming.



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

## interface [#interface]

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

```ts
export interface DocumentNode {
  readonly type: string;
  readonly value?: unknown;
  readonly raw?: string;
  readonly span?: SourceSpan;
  readonly attributes?: Readonly<Record<string, unknown>>;
  readonly children?: readonly DocumentNode[];
}
```

## Members [#members]

| Member       | Type                                             | Required | Description                                                                                 | Related types                                                          |
| ------------ | ------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `type`       | `string`                                         | Yes      | The `type` member uses the `string` contract.                                               | —                                                                      |
| `value`      | `unknown`                                        | No       | The `value` member uses the `unknown` contract.                                             | —                                                                      |
| `raw`        | `string \| undefined`                            | No       | The `raw` member uses the `string \| undefined` contract.                                   | —                                                                      |
| `span`       | `SourceSpan \| undefined`                        | No       | The `span` member uses the `SourceSpan \| undefined` contract.                              | [`SourceSpan`](/tuil/docs/reference/packages/streaming/api/source-span)     |
| `attributes` | `Readonly<Record<string, unknown>> \| undefined` | No       | The `attributes` member uses the `Readonly<Record<string, unknown>> \| undefined` contract. | —                                                                      |
| `children`   | `readonly DocumentNode[] \| undefined`           | No       | The `children` member uses the `readonly DocumentNode[] \| undefined` contract.             | [`DocumentNode`](/tuil/docs/reference/packages/streaming/api/document-node) |

## 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]

* [`SourceSpan`](/tuil/docs/reference/packages/streaming/api/source-span)

## Source [#source]

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

## Package [#package]

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