This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
Parameter properties information not being capture in ESTree parameter node #143
Closed
Description
What version of TypeScript are you using?
2.0.10 and 2.1.5
What version of typescript-eslint-parser
are you using?
1.0.2
What code were you trying to parse?
class Foo {
constructor(public name : string) {}
}
class Foo {
constructor(protected name : string) {}
}
class Foo {
constructor(private name : string) {}
}
class Foo {
constructor(readonly name : string) {}
}
class Foo {
constructor(public readonly name : string) {}
}
class Foo {
constructor(protected readonly name : string) {}
}
class Foo {
constructor(private readonly name : string) {}
}
What did you expect to happen?
Parameter properties should be parsed correctly and modifiers should be part of the final ESTree parameter node.
What happened?
The modifiers property of the TS Node is being ignored by the AST Converter. The final ESTree contains the parameters, but without the accessibility modifiers and/or readonly modifiers.
Sources: Parameter properties