marko-js / marko-js/htmljs-parser

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

Open
#202 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
143
Forks
18
Avg merge
3h 32m
Merged PRs (30d)
2

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the parser failure with the shown element and compare it with the working type-annotation form. Trace the TypeScript parser handling for type arguments in this Marko syntax; done means the type-argument form parses with the same behavior as the annotation form.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.