netlify / functions

JavaScript and TypeScript utilities for Netlify Functions.
https://www.npmjs.com/package/@netlify/functions
MIT License
41 stars 17 forks source link

fix: path imports for typescript #493

Closed mrstork closed 5 months ago

mrstork commented 5 months ago

🎉 Thanks for sending this pull request! 🎉

Please make sure the title is clear and descriptive.

If you are fixing a typo or documentation, please skip these instructions.

Otherwise please fill in the sections below.

Which problem is this pull request solving?

See https://github.com/netlify/functions/actions/runs/8939586357/job/24555907790

Describe the solution you've chosen

Remove export block to support node 10 and allow internal to be imported

Describe alternatives you've considered

Linking internal.ts in main.ts, however we look to want to keep these seperate

Checklist

Please add a x inside each checkbox:

ascorbic commented 5 months ago

WHy do you need to remove this?

ascorbic commented 5 months ago

Oh, I see. What you should insteasd do is leave the imports block and add imports.d.ts at the root, with an export of the dist file

ascorbic commented 5 months ago

Like this: https://github.com/ascorbic/unpic-img/blob/main/packages/react/nextjs.d.ts