Skip to main content

wrapWithDebugComment()

wrapWithDebugComment(ctx, description, lines): string[]

Experimental

Wraps code lines with debug comments indicating the validation being performed. Returns the original lines if not in debug mode.


Parametersโ€‹

ctx: GeneratorContextโ€‹

The generator context

description: stringโ€‹

Description of what is being validated

lines: string[]โ€‹

The code lines to wrap


Returns: string[]โ€‹

Array of code lines, potentially with debug comments


Sinceโ€‹

2.0.0