Skip to content

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

@lozandier

Description

@lozandier

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions