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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parameter property's modifier may not be followed by newline #28396

Open
ajafff opened this issue Nov 7, 2018 · 0 comments
Open

parameter property's modifier may not be followed by newline #28396

ajafff opened this issue Nov 7, 2018 · 0 comments
Labels
Bug A bug in TypeScript
Milestone

Comments

@ajafff
Copy link
Contributor

ajafff commented Nov 7, 2018

TypeScript Version: has been that way since at least 2.4

Search Terms:

Code

class Foo {
  constructor(public
    foo: string) {}
}

Expected behavior:

Treat is as a parameter property. Or at least document this in the spec (related #28395)

Actual behavior:

Treats it as two parameters with a syntax error because of a missing comma.

Playground Link: https://agentcooper.github.io/typescript-play/#code/MYGwhgzhAEBiD29oG8BQ1rHgOwgFwCcBXYPeAgCgAciAjEAS2HQ2gDNEAuafAh7AOYBKFAF9UooA

Related Issues:

@ghost ghost added the Bug A bug in TypeScript label Nov 7, 2018
@sheetalkamat sheetalkamat added this to the TypeScript 3.4.0 milestone Dec 8, 2018
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

4 participants