Type Alias Template<TemplateSpecType>

Template: {
    [P in keyof TemplateSpecType]?: P extends ValidRef
        ? TemplateSpecType[P] extends Lightning.Component.Constructor
            ? TemplateRequireType<TemplateSpecType[P]>
            : TemplateSpecType[P] extends Lightning.Element.Constructor
                ? Template<InstanceType<TemplateSpecType[P]>["__$type_TemplateSpec"]>
                : Template<
                    Lightning.Element<InlineElement<TemplateSpecType[P]>>["__$type_TemplateSpec"],
                >
        : P extends keyof Lightning.Element.TemplateSpec
            ? TemplateSpecType[P]
            : string extends P ? any : undefined
}

Type used for the return result of _template().

All TemplateSpec properties are made optional. Nested TemplateSpec properties are also made optional, except for the type propety which is made required.

Type Parameters