htmljs-parser icon indicating copy to clipboard operation
htmljs-parser copied to clipboard

typescript type arguments are only supported as type in <const> / <let>

Open yukulele opened this issue 1 month ago • 1 comments

Marko Version

6.0.120

Details

I use type arguments on init value of a <let/*> element:

<let/myMap=new Map<string, number>()>

Expected Behavior

get the same behaviors as:

<let/myMap:Map<string, number>=new Map()>

Actual Behavior

Marko is unable to parse.

yukulele avatar Dec 08 '25 00:12 yukulele

@yukulele potentially something we can add support for at some point in htmljs-parser so i'm going to move the issue there.

In the interim you can always wrap with parenthesis, eg <let/myMap=(new Map<string, number>())>.

DylanPiercey avatar Dec 11 '25 03:12 DylanPiercey