Skip to content
1 min read · 103 words

Type Alias: SpooledArtifactConstructor<A>

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

Defined in: lib/classes/spooled_artifact.ts:22

Constructor signature for SpooledArtifact and any subclass.

Type Parameters

Type ParameterDefault typeDescription
A extends SpooledArtifactSpooledArtifactThe SpooledArtifact subtype the constructor produces.

Parameters

ParameterType
readerSpoolReader
...restany[]

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?)).