KatChaotic / sveltedoc-parser

Generate a JSON documentation for a Svelte (https://github.com/sveltejs/svelte) component
https://www.npmjs.com/package/sveltedoc-parser
MIT License
90 stars 7 forks source link

Event dispatchers inside if blocks are ignored #81

Closed ekhaled closed 3 years ago

ekhaled commented 3 years ago
<script>
    import { createEventDispatcher } from 'svelte';

    const dispatch = createEventDispatcher();

    dispatch('notify', 'data');

    function someFunc(cond){
        dispatch('start', 'data');
        if(cond){
            dispatch('end', 'data');
        }
    }
</script>

Here, notify and start are picked up, but end is completely ignored