@ttsc/strip 0.14.0-dev.20260529.2 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/package.json +1 -1
- package/src/index.d.ts +1 -1
package/README.md
CHANGED
|
@@ -25,6 +25,8 @@ With no extra config, `@ttsc/strip` removes `console.log`, `console.debug`, `ass
|
|
|
25
25
|
|
|
26
26
|
Only the configured patterns are removed. `@ttsc/strip` is not a minifier, tree-shaker, or dead-code-elimination pass.
|
|
27
27
|
|
|
28
|
+
Stripping removes the entire statement, including its arguments. A side-effecting call nested inside a stripped statement-level call goes with it: `console.log(recordMetric())` drops `recordMetric()` along with the `console.log` statement.
|
|
29
|
+
|
|
28
30
|
## Configuration
|
|
29
31
|
|
|
30
32
|
Default behavior removes these statement patterns:
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare namespace createTtscStrip {
|
|
|
19
19
|
*
|
|
20
20
|
* Both keys are optional. The built-in defaults (`calls: ["console.log",
|
|
21
21
|
* "console.debug", "assert.*"]`, `statements: ["debugger"]`) apply only when
|
|
22
|
-
*
|
|
22
|
+
* _both_ keys are omitted; declaring either key replaces both defaults with
|
|
23
23
|
* exactly what the file lists.
|
|
24
24
|
*/
|
|
25
25
|
export interface ITtscStripConfig {
|