---
url: >-
  https://adk.nht.io/api/@nhtio/adk/forge/type-aliases/SpooledArtifactConstructor.md
description: 'Constructor signature for [`SpooledArtifact`](https://adk.nht.io/api/@nhtio/adk/spooled_artifact/classes/SpooledArtifact) and any subclass.'
---

# Type Alias: SpooledArtifactConstructor\<A>

```ts
type SpooledArtifactConstructor<A> = (reader: SpoolReader, ...rest: any[]) => A;
```

Defined in: [lib/classes/spooled\_artifact.ts:22](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/lib/classes/spooled_artifact.ts#L22)

Constructor signature for [SpooledArtifact](../../spooled_artifact/classes/SpooledArtifact.md) and any subclass.

## Type Parameters

| Type Parameter                                                                       | Default type                                                           | Description                                                                                                |
| ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `A` *extends* [`SpooledArtifact`](../../spooled_artifact/classes/SpooledArtifact.md) | [`SpooledArtifact`](../../spooled_artifact/classes/SpooledArtifact.md) | The [SpooledArtifact](../../spooled_artifact/classes/SpooledArtifact.md) subtype the constructor produces. |

## Parameters

| Parameter | Type                                                              |
| --------- | ----------------------------------------------------------------- |
| `reader`  | [`SpoolReader`](../../spooled_artifact/interfaces/SpoolReader.md) |
| ...`rest` | `any`\[]                                                           |

## Returns

`A`

## Remarks

Used by [@nhtio/adk!Tool](../classes/Tool.md) to declare the artifact subclass the consumer should use when wrapping
the handler's serialised output. The variadic rest parameter accommodates subclass-specific
constructor arguments (e.g. `SpooledJsonArtifact(reader, format?)`).
