Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

Polyserve tool re-writes correct JS generated by TS 3.7 to invalid synax when null coalesce & optional chaining is used #3474

Open lozandier opened 4 years ago

lozandier commented 4 years ago

When using TypeScript w/ Polyserve or PWA-starter-kit, the correct JS generated using TS 3.7 features get re-written in a weird way by the dev server pipelining leveraged by polymer serve:

foo?.someProp ?? "default value" 

gets re-written as invalid JS:

foo ? .someProp ? ? "default value : : :

The errors that populate involves babylon. Because of these errors, you have to stop the dev server constantly to re-run tsc to generate the correct code.

//cc @rictic

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.