typescript-transformer-rename-private
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

typescript-transformer-rename-private

A simple TypeScript transformer to rename private properties and methods to allow mangling by a minifier. See example/ for example usage with ttypescript and Rollup with terser.

Supports:

  • Dot property accessors
  • Bracket notation, where the property name is a string literal, or a constant with string literal type.
  • Destructing assignment, including nesting, renaming properties, and providing defaults
  • A custom private property prefix (default __private_) provided using transformer options, or a custom rename function

Does NOT support arbitrary indexing into the object. If you find any other unsupported syntax, please open an issue.

MIT License

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i typescript-transformer-rename-private

    Weekly Downloads

    0

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    28.7 kB

    Total Files

    9

    Last publish

    Collaborators

    • ictrobot