language-server
language-server copied to clipboard
Dynamic tag `Marko.Body<[{ foo: bar }]>` is inconsistent between params and args
@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" }) />
This was fixed by #262 but it caused a regression and the fix was reverted in #286. Will require some more thought.