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

[spec] Parameter properties with question marks and initializers are not clearly specified #541

Closed
mhegazy opened this issue Aug 26, 2014 · 0 comments
Assignees
Labels
Spec Issues related to the TypeScript language specification

Comments

@mhegazy
Copy link
Contributor

mhegazy commented Aug 26, 2014

class C {
     constructor(public x?, public y = 1) { }
}

The spec does not clearly explain whether x and y are optional properties of C. The old compiler treats them as required properties, but optional parameters. I am not sure this makes sense.

@mhegazy mhegazy added the Spec label Aug 26, 2014
@mhegazy mhegazy added the Bug A bug in TypeScript label Mar 24, 2015
@mhegazy mhegazy added this to the TypeScript 1.6 milestone Mar 24, 2015
@mhegazy mhegazy removed the Bug A bug in TypeScript label May 27, 2015
@mhegazy mhegazy modified the milestones: TypeScript 1.7, TypeScript 1.8 Oct 9, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Spec Issues related to the TypeScript language specification
Projects
None yet
Development

No branches or pull requests

2 participants