Skip to content

Allow @const inside an if block #7241

@blaumeise20

Description

@blaumeise20

Describe the problem

I want to make a {@const a = b} declaration inside an {#if cond} block, but svelte complains about it's parent.

Describe the proposed solution

It would be cool if it just worked.

Alternatives considered

None

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions