# DocType

Represents a parsed DOCTYPE declaration.

## Signatures

```ts
export declare class DocType {
    readonly _tag = "doctype";
    readonly name: string;
    readonly publicId: string | undefined;
    readonly systemId: string | undefined;
    constructor(name: string, publicType?: string, systemId?: string);
}
```

## Why

Renderer-neutral parsing retains document declaration metadata explicitly.

## Ownership and lifetime

The value owns strings only and has no document lifetime.

## Constructor

Creates a doctype AST node.

## Constructor: Why

Makes declaration tooling explicit.

## Constructor: Ownership and lifetime

Stores strings only.

## Property: _tag

Doctype discriminant.

## Property: _tag: Why

Selects declaration serialization.

## Property: _tag: Ownership and lifetime

Immutable metadata.

## Property: name

Declared document type name.

## Property: name: Why

Preserves author declaration data.

## Property: name: Ownership and lifetime

Retained string metadata.

## Property: publicId

Optional public identifier.

## Property: publicId: Why

Preserves complete doctype metadata.

## Property: publicId: Ownership and lifetime

Retained string metadata.

## Property: systemId

Optional system identifier.

## Property: systemId: Why

Preserves complete doctype metadata.

## Property: systemId: Ownership and lifetime

Retained string metadata.

## Examples

```ts
import { DocType } from "@typed/template/Template"

const node = new DocType("html")
```
