• A simple template-based, non-line-based preprocessor implementing if/elif/else/endif.

    Parameters

    • strings: TemplateStringsArray

      The array of constant string chunks of the template string.

    • Rest ...values: readonly (string | number | Directive)[]

    Returns string

    Example

        const shader = pp`
    ${pp._if(expr)}
    const x: ${type} = ${value};
    ${pp._elif(expr)}
    ${pp.__if(expr)}
    ...
    ${pp.__else}
    ...
    ${pp.__endif}
    ${pp._endif}`;

Generated using TypeDoc