• Tagged template literal that strips common leading indentation from every line, trims the first empty line and any trailing whitespace.

    Useful for writing multi-line strings inside indented code without the indentation leaking into the runtime value.

    Parameters

    • strings: TemplateStringsArray
    • Rest ...values: unknown[]

    Returns string

    Example

    const msg = dedent`
    Hello,
    world!
    `;
    // "Hello,\n world!"