Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Open
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I havesearched for related issues and found none that match my proposal.
- I have searched thecurrent rule list and found no rules that match my proposal.
- I haveread the FAQ and my problem is not listed.
Relevant Package
ast-spec
My proposal is suitable for this project
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Description
classTest1{constructor(private[foo]=[1],private{ bar}={bar:1},private ...baz){}}
Currently these three parameter properties are semantic errors in TS and are similarly allowed by our parser.
However they are all non-sensical. The first twodon't even transpile to generate a property!
We should make these hard errors to block the syntax so that we can refine ourTSParameterProperty.parameter type to exclude the invalid states.
An additional case which is already a hard TS parser error that we should pre-narrow the types for -- the.left of an assignment parameter propertymust always be anIdentifier.