Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve intellisense in JS Functions #941

Open
anthonychu opened this issue Apr 16, 2020 · 3 comments
Open

Improve intellisense in JS Functions #941

anthonychu opened this issue Apr 16, 2020 · 3 comments

Comments

@anthonychu
Copy link
Member

@btholt @dariagrigoriu After our conversation earlier this week about better typing/intellisense support for JS Functions, experimented with this a bit and it seems to work. We could update the JS templates with the proper JSDoc annotations to get VS Code intellisense to work. Requires these changes:

  • Add JSDoc style comments to all templates.
  • Include @azure/functions by default in package.json created by VS Code and Core Tools.

It uses a weird @param {import('@azure/functions').HttpRequest} req syntax that's a TypeScript thing and is not valid JSDoc. This could be a problem for anyone generating JSDoc for their function app.

Check out this sample repo here: https://github.com/anthonychu/functions-jsdoc-intellisense

@davidmrdavid
Copy link
Contributor

davidmrdavid commented Apr 16, 2020

This would be great to have! I'm also concerned about the @param {import('@azure/functions').<type>} <param> requirement. I would prefer to have something like @param az_func.HttpRequest req.

I'm unsure if we can do that, but I suspect that if we implicitly load function types under a handy namespace, like az_func, then it should be feasible?

Although if this is something that JS users are used to, when leveraging TS type definitions, then I'm not too concerned. Just my 2 cents

@liliankasem
Copy link
Member

@fabiocav or @ejizba any idea where the right place is for this issue to be triaged?

@ejizba
Copy link

ejizba commented Dec 13, 2021

@anthonychu do we still want to do this or should we close in favor of Azure/azure-functions-nodejs-worker#480?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants