pzavolinsky / ts-unused-exports

ts-unused-exports finds unused exported symbols in your Typescript project
MIT License
749 stars 49 forks source link

Feature Requirement: I want to find out the unused files whose exports are all unused. #253

Closed brandonxiang closed 1 year ago

brandonxiang commented 1 year ago

For example:

The export like c is unused. However, a and b are used by another files

Right now, ts-unused-exports only can tell us c. This kind of file cannot be easily removed. But we want to know all the unused filenames exactly, and remove them by scripts efficiently.

export function c(x: number) {
  a(b);
  return x + 2;
}

// used by another files
export const a = (b: number) => {
  console.log(1);
};

// used by another files
export const b = 11;

Any thoughts about this?

brandonxiang commented 1 year ago

I want to add a method getUnusedFiles in app.ts, to find out all unused files whose exports are all unused.

mrseanryan commented 1 year ago

Released as 9.0.0 - thank you