add TSParameterProperty to typescript ast nodes (#1507)
parent
c1a8ee011d
commit
14636947b6
|
@ -169,4 +169,7 @@ module.exports = function(fork) {
|
|||
.build("expression")
|
||||
.field("expression", def("Identifier"))
|
||||
.bases("Node");
|
||||
|
||||
def("TSParameterProperty")
|
||||
.build("accessibility", "isReadonly", "parameters")
|
||||
};
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`parameterProperty.ts 1`] = `
|
||||
class c3 {
|
||||
constructor(public arg: number = 10) {
|
||||
// fails because of comment
|
||||
}
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
class c3 {
|
||||
constructor(public arg: number = 10) {
|
||||
// fails because of comment
|
||||
}
|
||||
}
|
||||
|
||||
`;
|
|
@ -0,0 +1 @@
|
|||
run_spec(__dirname, { parser: "typescript" });
|
|
@ -0,0 +1,5 @@
|
|||
class c3 {
|
||||
constructor(public arg: number = 10) {
|
||||
// fails because of comment
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue