Accept an options object in the constructor and store values as class fields. Instantiate the pipe with new passing the options at the usage site. Note that when using new, the pipe is not resolved through DI and cannot inject services — for pipes that need both options and DI, register them as providers and configure via injection tokens.
Store options as readonly class fields — immutable after construction.
Provide sensible defaults for optional options using the ?? nullish coalescing operator.
Using new bypasses the DI container — the pipe cannot inject services this way.
For pipes needing both options and DI, register as a provider and pass options via an InjectionToken.
Different instances at different params allow per-parameter configuration in the same handler.