@adobe/data - v0.10.30
    Preparing search index...

    Interface Archetype<C, DK>

    interface Archetype<C = {}, DK extends keyof C = never> {
        columns: {
            readonly [K in string | number | symbol]: TypedBuffer<
                (C & RequiredComponents)[K],
            >
        };
        components: ComponentSet<Extract<keyof C, string>>;
        fromData: (data: unknown, rehome?: boolean) => void;
        id: number;
        insert: <
            T extends
                | Omit<C, "id">
                | Omit<C, "id" | DK> & Partial<
                    Pick<C, Exclude<Extract<DK, keyof C>, "id">>,
                >
                | {
                    [K in string | number | symbol]: (
                        Omit<C, "id" | DK> & Partial<
                            Pick<C, Exclude<Extract<DK, keyof C>, "id">>,
                        >
                    )[K]
                },
        >(
            rowData: Exact<EntityInsertValues<C, DK>, T>,
        ) => number;
        rowCapacity: number;
        rowCount: number;
        toData: (copy?: boolean, omit?: ReadonlySet<string>) => unknown;
    }

    Type Parameters

    • C = {}
    • DK extends keyof C = never

    Hierarchy (View Summary)

    Index

    Properties

    columns: {
        readonly [K in string | number | symbol]: TypedBuffer<
            (C & RequiredComponents)[K],
        >
    }
    components: ComponentSet<Extract<keyof C, string>>
    fromData: (data: unknown, rehome?: boolean) => void

    Restore column data. rehome (set by the snapshot-restore path) re-homes adopted default-allocated columns onto the archetype's injected allocator, so a loaded store keeps its arena backing; it is a no-op without a custom allocator.

    id: number
    insert: <
        T extends
            | Omit<C, "id">
            | Omit<C, "id" | DK> & Partial<
                Pick<C, Exclude<Extract<DK, keyof C>, "id">>,
            >
            | {
                [K in string | number | symbol]: (
                    Omit<C, "id" | DK> & Partial<
                        Pick<C, Exclude<Extract<DK, keyof C>, "id">>,
                    >
                )[K]
            },
    >(
        rowData: Exact<EntityInsertValues<C, DK>, T>,
    ) => number
    rowCapacity: number
    rowCount: number
    toData: (copy?: boolean, omit?: ReadonlySet<string>) => unknown