Skip to content

PendingBinaryItem — @gj-kit/expo-media

A public type from @gj-kit/expo-media. The signature below is taken directly from the 0.6.1 release declaration.

import { PendingBinaryItem } from '@gj-kit/expo-media';
/**
* A binary (web `File`, `Blob`, or any `NamedBinarySource`) staged for a later upload.
*
* Core never touches DOM APIs, so the preview resource is injected: `previewUri` is whatever the
* host can render (typically an object URL) and `revoke` releases it. On web,
* `pendingItemFromFile` from `@gj-kit/expo-media/web` builds this shape from a DOM `File`.
*/
type PendingBinaryItem = {
readonly kind: 'binary';
readonly source: NamedBinarySource;
/** Renderable preview URI (for example an object URL). Omit when none exists. */
readonly previewUri?: string | undefined;
/**
* Releases the preview resource. The selection calls it **at most once per item object**, when
* the item leaves a selection through `remove`/`clear`, or when the host passes it to `release`.
*/
readonly revoke?: (() => void) | undefined;
/**
* Modification timestamp (ms epoch) folded into the dedup key, e.g. DOM `File.lastModified`.
* Without it two binaries with the same name and size are considered the same file.
*/
readonly lastModified?: number | undefined;
};

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/expo-media
  • Version: 0.6.1
  • Public entry: .
  • Source: GitHub