Interface ToLiteralOptions

Hierarchy

  • ToLiteralOptions

Properties

Properties

fastCharacters?: boolean

This will force the function to print characters as fast as possible.

Literals created with this option will usually be created about 10x faster but the result will usually be very hard to read. The is option is intended to provide performance benefits when readability is not a concern.

Default

false
flags?: Flags

An optional template for the flags of the JavaScript RegExp literal to be created.

All flags that are set to false are guaranteed to be disabled in the created literal. Likewise, all flags that are set to true are guaranteed to be enabled in the created literal.

Flags that are undefined will be enabled/disabled depending on the implementation. While no guarantees are given, the implementation will generally try to choose flags such that it can create a literal that is as small/simple as possible.

If the constraints on flags defined here make it impossible to create a literal, an error will be thrown.