@dxos/echo
    Preparing search index...

    Class Blob

    Runtime schema for a Blob object.

    NOTE: This export shadows the DOM Blob global within modules that import it as a namespace. Code that needs the DOM class should use globalThis.Blob explicitly.

    const blob = yield* Blob.fromBytes(bytes, { type: 'image/png' });
    

    Hierarchy

    • {
          data:
              | { _tag: "inline"; bytes: Uint8Array<ArrayBufferLike> }
              | { _tag: "external"; uri: string };
          size: number;
          type?: string;
      } & OfKind<Object, this>
      • Blob
    Index

    Constructors

    • Parameters

      • _: never

      Returns Blob.Blob

    Properties

    "~@dxos/echo/Kind": Object
    data:
        | { _tag: "inline"; bytes: Uint8Array<ArrayBufferLike> }
        | { _tag: "external"; uri: string } = BlobData

    Type declaration

    • { _tag: "inline"; bytes: Uint8Array<ArrayBufferLike> }
    • { _tag: "external"; uri: string }
      • Readonly_tag: "external"
      • Readonlyuri: string

        URI locating the bytes. The scheme selects the backend at read time (e.g. ni:///sha-256;… for the edge backend — an RFC 6920 content digest, not a backend name — or wnfs://… for the plugin-wnfs extension), resolved via the scheme→backend map built from registerBlobBackend calls. Core code never parses or constructs backend-specific URIs beyond reading the scheme.

        RFC 6920 for the ni: URI format.

    id: string
    size: number = Schema.Number
    type?: string = ...

    MIME type.

    "~@dxos/echo/Kind": Type

    Entity-kind brand of the type-entity value itself — always EntityKind.Type. The kind of instance the type describes lives on [SchemaKindId] (Object / Relation / Type). Lets Obj.isObject / Relation.isRelation reject type entities by a single [KindId] check.

    "~@dxos/echo/SchemaKind": Object

    Schema-kind brand (object).

    "~@dxos/echo/Type.Instance"?: Blob.Blob & OfKind<Object>
    "~@dxos/echo/Type.StaticSchema": Codec<any, any>

    Source Effect Schema — used internally by Type.getSchema(self).

    fields: {}

    The fields defined in the original struct schema. Allows accessing field definitions for introspection.

    id: string

    Object id. Like all ECHO entities, type entities always carry an id — stamped at construction for in-memory (static) declarations and assigned by the database once persisted. The id does NOT determine the entity's URI: static types resolve to their typename DXN, persisted types to echo:///<id> (see getTypeURIFromSpecifier).

    jsonSchema: JsonSchemaType
    name?: string