Type Alias: SpooledArtifactConstructor<A>
ts
type SpooledArtifactConstructor<A> = (reader: SpoolReader, ...rest: any[]) => A;Constructor signature for SpooledArtifact and any subclass.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
A extends SpooledArtifact | SpooledArtifact | The SpooledArtifact subtype the constructor produces. |
Parameters
| Parameter | Type |
|---|---|
reader | SpoolReader |
...rest | any[] |
Returns
A
Remarks
Used by @nhtio/adk!Tool 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?)).