chore: improve SlotMixin feedback

This commit is contained in:
Thijs Louisse 2022-12-06 10:30:55 +01:00 committed by Thijs Louisse
parent 36910e5d70
commit 9d31c179b1

View file

@ -196,7 +196,8 @@ const SlotMixinImplementation = superclass =>
this.__slotsThatNeedRerender.add(slotName); this.__slotsThatNeedRerender.add(slotName);
} else { } else {
throw new Error( throw new Error(
'Please provide a function inside "get slots()" returning TemplateResult | Node | {template:TemplateResult, afterRender?:function} | undefined', `Slot "${slotName}" configured inside "get slots()" (in prototype) of ${this.constructor.name} may return these types: TemplateResult | Node | {template:TemplateResult, afterRender?:function} | undefined.
You provided: ${slotFunctionResult}`,
); );
} }
} }