Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LuLaValva opened this issue Jul 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@LuLaValva
Copy link
Member

@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" }) />
@LuLaValva LuLaValva added the bug Something isn't working label Jul 9, 2024
@DylanPiercey
Copy link
Contributor

This was fixed by #262 but it caused a regression and the fix was reverted in #286.
Will require some more thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants