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

    Variable archetypesConst

    archetypes: <
        C extends ComponentSchemas,
        const A extends { readonly [name: string]: EntityComponents<C> },
    >(
        _components: C,
        map: A,
    ) => A = archetypesFacet

    Type declaration

      • <
            C extends ComponentSchemas,
            const A extends { readonly [name: string]: EntityComponents<C> },
        >(
            _components: C,
            map: A,
        ): A
      • Declare a feature's archetypes, validating every key against components and preserving each archetype's literal key tuple (via a const type parameter), so no per-archetype as const satisfies is needed. components is passed as a value (it is imported anyway) because TypeScript can't infer the tuple type while a component-type argument is also supplied explicitly.

        export const archetypes = Database.archetypes(components, {
        Todo: ["todo", "name", "complete", "order", "dragPosition", "assignees"],
        });

        Type Parameters

        • C extends ComponentSchemas
        • const A extends { readonly [name: string]: EntityComponents<C> }

        Parameters

        • _components: C
        • map: A

        Returns A