diff --git a/lib/convert.js b/lib/convert.js index cf71e7d..124c424 100644 --- a/lib/convert.js +++ b/lib/convert.js @@ -1121,7 +1121,7 @@ module.exports = function convert(config) { range: [node.getStart(), node.end], loc: nodeUtils.getLoc(node, ast), accessibility: nodeUtils.getTSNodeAccessibility(node), - isReadonly: nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node), + readonly: nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node), static: nodeUtils.hasModifier(SyntaxKind.StaticKeyword, node), export: nodeUtils.hasModifier(SyntaxKind.ExportKeyword, node), parameter: result diff --git a/tests/fixtures/typescript/basics/class-with-export-parameter-properties.result.js b/tests/fixtures/typescript/basics/class-with-export-parameter-properties.result.js index 0bbff21..a97ced0 100644 --- a/tests/fixtures/typescript/basics/class-with-export-parameter-properties.result.js +++ b/tests/fixtures/typescript/basics/class-with-export-parameter-properties.result.js @@ -107,7 +107,7 @@ module.exports = { } }, "accessibility": null, - "isReadonly": false, + "readonly": false, "static": false, "export": true, "parameter": { diff --git a/tests/fixtures/typescript/basics/class-with-private-parameter-properties.result.js b/tests/fixtures/typescript/basics/class-with-private-parameter-properties.result.js index 2d64e5f..15ae8d8 100644 --- a/tests/fixtures/typescript/basics/class-with-private-parameter-properties.result.js +++ b/tests/fixtures/typescript/basics/class-with-private-parameter-properties.result.js @@ -113,9 +113,9 @@ module.exports = { }, "decorators": [], "accessibility": "private", - "isReadonly": false, "static": false, "export": false, + "readonly": false, "parameter": { "type": "Identifier", "range": [ @@ -187,9 +187,9 @@ module.exports = { }, "decorators": [], "accessibility": "private", - "isReadonly": true, "static": false, "export": false, + "readonly": true, "parameter": { "type": "Identifier", "range": [ @@ -261,9 +261,9 @@ module.exports = { }, "decorators": [], "accessibility": "private", - "isReadonly": false, "static": false, "export": false, + "readonly": false, "parameter": { "left": { "type": "Identifier", @@ -371,9 +371,9 @@ module.exports = { }, "decorators": [], "accessibility": "private", - "isReadonly": true, "static": false, "export": false, + "readonly": true, "parameter": { "left": { "type": "Identifier", diff --git a/tests/fixtures/typescript/basics/class-with-protected-parameter-properties.result.js b/tests/fixtures/typescript/basics/class-with-protected-parameter-properties.result.js index 31a388e..3ff625a 100644 --- a/tests/fixtures/typescript/basics/class-with-protected-parameter-properties.result.js +++ b/tests/fixtures/typescript/basics/class-with-protected-parameter-properties.result.js @@ -143,9 +143,9 @@ module.exports = { }, "decorators": [], "accessibility": "protected", - "isReadonly": false, "static": false, "export": false, + "readonly": false, "parameter": { "type": "Identifier", "range": [ @@ -217,9 +217,9 @@ module.exports = { }, "decorators": [], "accessibility": "protected", - "isReadonly": true, "static": false, "export": false, + "readonly": true, "parameter": { "type": "Identifier", "range": [ @@ -291,9 +291,9 @@ module.exports = { }, "decorators": [], "accessibility": "protected", - "isReadonly": false, "static": false, "export": false, + "readonly": false, "parameter": { "type": "AssignmentPattern", "range": [ @@ -401,9 +401,9 @@ module.exports = { }, "decorators": [], "accessibility": "protected", - "isReadonly": true, "static": false, "export": false, + "readonly": true, "parameter": { "type": "AssignmentPattern", "range": [ diff --git a/tests/fixtures/typescript/basics/class-with-public-parameter-properties.result.js b/tests/fixtures/typescript/basics/class-with-public-parameter-properties.result.js index a29e488..14de49a 100644 --- a/tests/fixtures/typescript/basics/class-with-public-parameter-properties.result.js +++ b/tests/fixtures/typescript/basics/class-with-public-parameter-properties.result.js @@ -143,9 +143,9 @@ module.exports = { }, "decorators": [], "accessibility": "public", - "isReadonly": false, "static": false, "export": false, + "readonly": false, "parameter": { "type": "Identifier", "range": [ @@ -217,9 +217,9 @@ module.exports = { }, "decorators": [], "accessibility": "public", - "isReadonly": true, "static": false, "export": false, + "readonly": true, "parameter": { "type": "Identifier", "range": [ @@ -291,9 +291,9 @@ module.exports = { }, "decorators": [], "accessibility": "public", - "isReadonly": false, "static": false, "export": false, + "readonly": false, "parameter": { "type": "AssignmentPattern", "range": [ @@ -401,9 +401,9 @@ module.exports = { }, "decorators": [], "accessibility": "public", - "isReadonly": true, "static": false, "export": false, + "readonly": true, "parameter": { "type": "AssignmentPattern", "range": [ diff --git a/tests/fixtures/typescript/basics/class-with-readonly-parameter-properties.result.js b/tests/fixtures/typescript/basics/class-with-readonly-parameter-properties.result.js index 9823df6..5ecb341 100644 --- a/tests/fixtures/typescript/basics/class-with-readonly-parameter-properties.result.js +++ b/tests/fixtures/typescript/basics/class-with-readonly-parameter-properties.result.js @@ -143,9 +143,9 @@ module.exports = { }, "decorators": [], "accessibility": null, - "isReadonly": true, "static": false, "export": false, + "readonly": true, "parameter": { "type": "Identifier", "range": [ @@ -217,9 +217,9 @@ module.exports = { }, "decorators": [], "accessibility": null, - "isReadonly": true, "static": false, "export": false, + "readonly": true, "parameter": { "type": "AssignmentPattern", "range": [ diff --git a/tests/fixtures/typescript/basics/class-with-static-parameter-properties.result.js b/tests/fixtures/typescript/basics/class-with-static-parameter-properties.result.js index d5c7807..840e5f5 100644 --- a/tests/fixtures/typescript/basics/class-with-static-parameter-properties.result.js +++ b/tests/fixtures/typescript/basics/class-with-static-parameter-properties.result.js @@ -107,7 +107,7 @@ module.exports = { } }, "accessibility": null, - "isReadonly": false, + "readonly": false, "static": true, "export": false, "parameter": { diff --git a/tests/fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.result.js b/tests/fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.result.js index ea91b7e..8e7e7b6 100644 --- a/tests/fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.result.js +++ b/tests/fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.result.js @@ -69,9 +69,9 @@ module.exports = { } }, "accessibility": "public", - "isReadonly": false, "static": false, "export": false, + "readonly": false, "parameter": { "type": "Identifier", "range": [ @@ -108,9 +108,9 @@ module.exports = { } }, "accessibility": "private", - "isReadonly": false, "static": false, "export": false, + "readonly": false, "parameter": { "type": "Identifier", "range": [