Skip to content

Commit

Permalink
docs: add example
Browse files Browse the repository at this point in the history
  • Loading branch information
kazushisan committed Sep 23, 2024
1 parent 8dff534 commit ffae1fc
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ When `b` is not used within the project but `f()` is used within the project:
}
```

When `f()` is not used within the project and deleting it will result in `import` being unnecessary:
When `f()` is not used within the project and when deleting it will result in `import` being unnecessary:

```diff
--- src/c.ts
Expand All @@ -73,6 +73,23 @@ When `f()` is not used within the project and deleting it will result in `import
-}
```

When `f()` and `exported` are not used within the project and when deleting `f()` will result in `exported` and `local` being unnecessary:

```diff
--- src/d.ts
+++ src/d.ts
@@ -1,8 +1 @@
-export const exported = "exported";
-const local = "local";
-
export const d = "d";
-
-export function f() {
- return { exported, local };
-}

```

<!-- prettier-ignore-end -->

In addition to the behavior shown in the examples above, ts-remove-unused will delete files that have no used exports.
Expand Down

0 comments on commit ffae1fc

Please sign in to comment.