Closed bfourgeaud closed 1 year ago
ntsapi scaffolds a default arrow function export. Visual Studio code complains (warning) that we should assign that arrow function to a variable before exporting. I would suggest changing the template in order to remove the warning if possible.
Current (warning displayed) :
import { NextApiRequest, NextApiResponse } from 'next'; export default (req:NextApiRequest, res:NextApiResponse) => { req.statusCode = 200 }
Suggestion (no warning) :
import { NextApiRequest, NextApiResponse } from 'next'; const handle = (req:NextApiRequest, res:NextApiResponse) => { req.statusCode = 200 } export default handle
And by the way, thank you for the plugin, It's much useful ;)
ntsapi scaffolds a default arrow function export. Visual Studio code complains (warning) that we should assign that arrow function to a variable before exporting. I would suggest changing the template in order to remove the warning if possible.
Current (warning displayed) :
Suggestion (no warning) :
And by the way, thank you for the plugin, It's much useful ;)