@dxos/compute - v0.16.0
    Preparing search index...

    Class Spec

    A spec: normative .mdl text that its project's work delivers. Its dialects say which block kinds beyond the core and changelog ones the text uses, which a plugin then extracts into objects of its own and keeps as annotations on the spec. A project owns its specs (Project.specs), so a spec is not a type of its own in a space. A .mdl file's front matter is the spec's fields and meta rather than its text: name is name, id and version are the meta's key and version.

    Hierarchy

    • {
          content: Ref<Text & OfKind<Object> & Unknown>;
          description?: string;
          dialects: readonly string[];
          name: string;
      } & OfKind<Object, this>
      • Spec
    Index

    Constructors

    • Parameters

      • _: never

      Returns Spec.Spec

    Properties

    "~@dxos/echo/Kind": Object
    content: Ref<Text & OfKind<Object> & Unknown> = ...

    The .mdl text; owned, so it is deleted with the spec.

    description?: string = ...
    dialects: readonly string[] = ...

    The ids of the dialect specs whose blocks the text uses, as a .mdl file lists them in its front matter's extends. Empty means the core and changelog blocks only.

    id: string
    name: string = ...
    "~@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"?: Spec.Spec & 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