Skip to content
1 min read · 161 words

Class: DefaultArtifactMinter ​

Defined in: src/batteries/sandbox/defaults/default_minter.ts:35

A pure minter with optional, lazily loaded consumer formats.

Implements ​

Constructors ​

Constructor ​

ts
new DefaultArtifactMinter(formats?: readonly ArtifactFormat[]): DefaultArtifactMinter;

Defined in: src/batteries/sandbox/defaults/default_minter.ts:38

Parameters ​

ParameterTypeDefault value
formatsreadonly ArtifactFormat[][]

Returns ​

DefaultArtifactMinter

Methods ​

constructorForMime() ​

ts
constructorForMime(mime: string | undefined): Promise<SpooledArtifactConstructor>;

Defined in: src/batteries/sandbox/defaults/default_minter.ts:52

Resolve the constructor for a MIME type; unknown types use the base artifact.

Parameters ​

ParameterType
mimestring | undefined

Returns ​

Promise<SpooledArtifactConstructor>


constructorForPath() ​

ts
constructorForPath(path: string, mime?: string): Promise<SpooledArtifactConstructor>;

Defined in: src/batteries/sandbox/defaults/default_minter.ts:67

Resolve the constructor from a MIME type, then an extension, without validating content.

Parameters ​

ParameterType
pathstring
mime?string

Returns ​

Promise<SpooledArtifactConstructor>


formats() ​

ts
formats(): Promise<ArtifactFormat[]>;

Defined in: src/batteries/sandbox/defaults/default_minter.ts:43

Return format metadata without invoking any constructor thunk.

Returns ​

Promise<ArtifactFormat[]>

Implementation of ​

ArtifactMinter.formats