tatethurston / nextjs-routes

Type safe routing for Next.js
MIT License
553 stars 20 forks source link

Change export file path(d.ts) #143

Closed po4tion closed 1 year ago

po4tion commented 1 year ago

Save the file to the "@types" folder for the following reasons.

[ Why recommend ]

  1. The purpose of the @types folder is to collect type definition files (*.d.ts) from external libraries.

  2. You can tell by looking at the folder name that the file (nextjs-routes.d.ts) is associated with an external library.

  3. Folder separation allows you to obtain a separation of concerns effect from the root path.

tatethurston commented 1 year ago

This is already configurable, so the proposal here is to change the default write location? That seems reasonable to me, since @types is a common typescript convention.

Could you update the README as well? Specifically, updating all references to nextjs-routes.d.ts to @types/nextjs-routes.d.ts.

po4tion commented 1 year ago

Thanks @po4tion. This looks good overall, just a few small updates.

Thank you for your advice @tatethurston.

First of all, I'm sorry that I didn't clarify the purpose in the orignal. As you said, I registered Pull Request to change "default write location".

Also, I revised the README.md file after accepting your opinion.

tatethurston commented 1 year ago

Thanks @po4tion !