alexprey / 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

Enhance function expression metadata #78

Closed ekhaled closed 2 years ago

ekhaled commented 3 years ago
export let subtract = function(a, b){
  return a - b;
}

export let multiply = (a, b = 1) => {
    return a * b;
}

These VariableDeclaration items contain FunctionExpression and ArrowFunctionExpression within them.

We should treat these similar to FunctionDeclaration and make parameters and return values available in the output.