Skip to content

Dynamic tag Marko.Body<[{ foo: bar }]> is inconsistent between params and args #270

Open
@LuLaValva

Description

@LuLaValva

@marko/[email protected]

Details

The following should be equivalent:

<${input.renderBody} foo=bar />
<${input.renderBody}({ foo: bar }) />

But they aren't. It looks like Marko.Body<{ foo: bar }> expects Directives & { value: [{ foo: bar; }]; }, which may have been carried over from when the syntax for dynamic tag params was going to be <${input.renderBody}=[{ foo: bar}] />. This should probably be updated.

Steps to Reproduce

Example template:

export interface Input {
  renderBody: Marko.Body<[{ foo: string }]>;
}

<${input.renderBody} foo="bar" />
<${input.renderBody}({ foo: "bar" }) />

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions