Open
Description
Describe the problem
It is possible to set transitions via props when creating Svelte components:
<script>
export let transition;
</script>
<p transition:transition|local>Hi!</p>
However, they cannot be optional:
<script>
export let transition = undefined;
</script>
<p transition:transition|local>Hi!</p>
Error thrown if transition is undefined:
Describe the proposed solution
Check if transition is a function before running it.
The current implementation does not check if fn is of type "function"
Alternatives considered
Setting a default empty empty function:
<script>
export let transition = () => {};
</script>
<p transition:transition|local>Hi!</p>
However, this is a potential memory leak until this pr is merged.
Importance
would make my life easier