Skip to content

Unmodified content rerendered when code is compiled with TypeScript to ES5 #270

Closed
@wlinna

Description

@wlinna

In short, hyperHTM doesn't work with TypeScript, because when code is compiled with TypeScript to ES5, unmodified content is rerendered. With Babel that doesn't happen.

I created a pen to demonstrate this issue:

https://codepen.io/anon/pen/oPoWXX?editors=0011

To see the issue, select TypeScript as a preprocessor (if it isn't already), start the video, and then press the button. The problem doesn't occur when using Babel as a preprocessor.

While I know this is a TypeScript problem (and you won't like seeing this issue here), I reported it here for two reasons:

  • To let you know that this problem still exists, even after efforts to fix / workaround the the problem
  • I don't know how to show that this is a TypeScript problem. I tried to understand the issue myself first*, but I'm unable to comprehend this problem fully (or more specifically, the attempted fix in TypeScript).

I know that you attempted to workaround the issue, but I don't know if it is present in hyperHTML v2, or if it ever covered this issue (completely).

It might be worth mentioning in the documentation, that using TypeScript with ES5 output is problematic, even if the problem is on the TypeScript side.

*I read microsoft/TypeScript#17956, #101, microsoft/TypeScript#18300 and some of your blog-posts

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions