Skip to content

Some unsupported code with es2015 target set #22270

@SetoKaiba

Description

@SetoKaiba

Which @angular/* package(s) are the source of the bug?

common

Is this a regression?

No

Description

image
This is not supported for es2015. But it's still there after compile. I'm trying to write a webpage for OBS studio. The ?. is not supported I think. And I think it's not in es2015 as well.
image
Here is the tsconfig. Set target to es2015 doesn't help. But the unsupported is gone if I set target to es5.
https://github.com/angular/angular/blob/b5ab7aff433a67cddaa55e621d17b1a1b07b57c2/packages/common/src/location/location_strategy.ts#L176-L178
Why this ?. is kept even I set target to es2015?

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

No response

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions