You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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.
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
@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:
@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
The text was updated successfully, but these errors were encountered: