Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameters properties do not parse when split into two lines #47080

Open
OmarTawfik opened this issue Dec 9, 2021 · 1 comment
Open

Parameters properties do not parse when split into two lines #47080

OmarTawfik opened this issue Dec 9, 2021 · 1 comment
Labels
Bug A bug in TypeScript
Milestone

Comments

@OmarTawfik
Copy link

Bug Report

馃攷 Search Terms

public parameter constructor class

馃晽 Version & Regression Information

  • Bug existed in all versions, even nightly, and reproducible on the playground.
  • Playground link

馃捇 Code

class Foo {
    public constructor(
        // Parameter is parsed correctly
        public a: number, 
        // Parameter is actually parsed as two, with two different parse errors
        public 
        b: number) {
    }
}

Workbench Repro

馃檨 Actual behavior

It fails to parse the parameter, with two irrelevant errors.

馃檪 Expected behavior

It should be parsed correctly.

@DanielRosenwasser DanielRosenwasser changed the title Parameters parsing fail when split into two lines Parameters properties do not parse when split into two lines Dec 9, 2021
@DanielRosenwasser
Copy link
Member

Technically there's no reason I can think of for a line terminator restriction, but we've generally tried no to fiddle too much with parameter properties in case we further conflict with future ECMAScript syntax.

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Dec 9, 2021
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants