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
It's a nice enhancement. Hoping that the inference logic is quite robust. Some cases to think about are:
Here's a TS library which has "main" in package.json as dist/index.js but no src/index.ts.
In another TS project, I have "main": "dist/esm/index.js" because we are generating multiple types of distributions.
I'm sure you'd have some criteria to effectively handle multiple scenarios, but just pointing out some cases which I personally would benefit more from.
Further, it would be great if the users can provide a glob/regex to specify which files to analyze. It (along with the already existing ignoreFiles option) would offer a great amount of control. The README seems to have some formatting issue related to the ignoreFiles option though.
Thank you @maneetgoyal for the library link. That library seems to be all .html or .tsx files no regular .ts files? To be honest, this kind of project is not something I've been thinking about (moistly working with ts and tsx files. So this example is interesting.
Ignore unused exports from the entry point of library (package.json).
This could be useful for source code of libraries.
So if
package.json
says:Then use
tsconfig.json
to infer thatsrc/app.ts
is the entry point.Then ignore unused exports from that file.
note: there is a workaround, using the
ignorePaths=app.ts
option - but that is not as nice to use.The text was updated successfully, but these errors were encountered: