Functions

canPutArtifactStream

Function: canPutArtifactStream()

canPutArtifactStream(store): store is PutStreamingArtifactStore

Defined in: src/artifacts/streaming.ts:64

Can this store take a streamed put? Narrowing type guard — the answer is the type, so a consumer branches once and the compiler carries it.

Parameters

store

ArtifactStore

Returns

store is PutStreamingArtifactStore

Example

if (canPutArtifactStream(store)) await store.putStream(scope, input, body);
  else await store.put(scope, { ...input, data: await collect(body) });

On this page