• Preparing search index...
  • The search index is not available
Documentation
  • Documentation
  • svelte-ast-print
  • svelte-ast-print/template
  • printIfBlock

Function printIfBlock

  • printIfBlock(n: IfBlock, opts?: Partial<PrintOptions>): Result<IfBlock>

    Parameters

    • n: IfBlock
    • opts: Partial<PrintOptions> = {}

    Returns Result<IfBlock>

    See

    https://svelte.dev/docs/svelte/if

    Example: simple

    {#if expression}...{/if}
    

    Example: with else if

    {#if expression}...{:else if expression}...{/if}
    

    Example: with else

    {#if expression}...{:else}...{/if}
    

    Example: with else if and else

    {#if expression}...{:else if expression}...{:else}...{/if}
    

    Example: with multiple else if and else

    {#if expression}...{:else if expression}...{:else if expression}...{:else}...{/if}
    

    Since

    1.0.0 @NO_SIDE_EFFECTS

    • Defined in pkgs/svelte-ast-print/src/template/mod.ts:641

Settings

Member Visibility
Documentation
  • Loading...

Generated using TypeDoc