lit / lit/lit.dev

Freeze on incomplete `for` loop

Open
#1,387 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
142
Forks
230
PR merge metrics
No merged PRs in 30d

Description

It seems like https://github.com/lit/lit.dev/issues/411 is still a problem.

Steps to reproduce:
1. Go to https://lit.dev/tutorials/working-with-lists/#4
2. Use this for the `render` method:
```ts
render () {
for (
}
```
3. The tab freezes

I'm on Firefox 133.0.3.

Maybe it would be reasonable to not update the playground if TypeScript emits an error, if it doesn't have a good way to communicate whether it's a syntax error or a type checking error?

Contributor guide

Open the contributing guide

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

Start by reproducing the freeze at the Lit tutorial entry point https://lit.dev/tutorials/working-with-lists/#4 using the incomplete render method shown in the issue, in Firefox. Trace the playground update path and determine how TypeScript errors are handled. Done means incomplete syntax no longer freezes the tab while valid tutorial code continues to update.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.