mithril-materialized
    Preparing search index...

    Type Alias WithId<T, Required>

    WithId: Required extends true
        ? T & { id: ComponentId }
        : T & { id?: ComponentId }

    Conditional type to make ID required or optional

    Type Parameters

    • T

      The base type

    • Required extends boolean = false

      Whether ID should be required