...slots.map(slot =>
slot.slotType === IRSlotType.STATIC
? genStaticSlots(slot, context)
- : genDynamicSlot(slot, context, true),
+ : slot.slotType === IRSlotType.EXPRESSION
+ ? slot.slots.content
+ : genDynamicSlot(slot, context, true),
),
)
}
DYNAMIC,
LOOP,
CONDITIONAL,
+ EXPRESSION, // JSX only
}
export type IRSlotsStatic = {
slotType: IRSlotType.STATIC
positive: IRSlotDynamicBasic
negative?: IRSlotDynamicBasic | IRSlotDynamicConditional
}
+export interface IRSlotsExpression {
+ slotType: IRSlotType.EXPRESSION
+ slots: SimpleExpressionNode
+}
export type IRSlotDynamic =
| IRSlotDynamicBasic
| IRSlotDynamicLoop
| IRSlotDynamicConditional
-export type IRSlots = IRSlotsStatic | IRSlotDynamic
+export type IRSlots = IRSlotsStatic | IRSlotDynamic | IRSlotsExpression