Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Commit b06ac2d

Browse files
committed
Breaking: Change isReadonly to readonly (fixes #284)
1 parent 3491b4b commit b06ac2d

6 files changed

+17
-17
lines changed

lib/convert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ module.exports = function convert(config) {
10931093
range: [node.getStart(), node.end],
10941094
loc: nodeUtils.getLoc(node, ast),
10951095
accessibility: nodeUtils.getTSNodeAccessibility(node),
1096-
isReadonly: nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node),
1096+
readonly: nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node),
10971097
parameter: result
10981098
};
10991099
}

tests/fixtures/typescript/basics/class-with-private-parameter-properties.result.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ module.exports = {
113113
},
114114
"decorators": [],
115115
"accessibility": "private",
116-
"isReadonly": false,
116+
"readonly": false,
117117
"parameter": {
118118
"type": "Identifier",
119119
"range": [
@@ -185,7 +185,7 @@ module.exports = {
185185
},
186186
"decorators": [],
187187
"accessibility": "private",
188-
"isReadonly": true,
188+
"readonly": true,
189189
"parameter": {
190190
"type": "Identifier",
191191
"range": [
@@ -257,7 +257,7 @@ module.exports = {
257257
},
258258
"decorators": [],
259259
"accessibility": "private",
260-
"isReadonly": false,
260+
"readonly": false,
261261
"parameter": {
262262
"left": {
263263
"type": "Identifier",
@@ -365,7 +365,7 @@ module.exports = {
365365
},
366366
"decorators": [],
367367
"accessibility": "private",
368-
"isReadonly": true,
368+
"readonly": true,
369369
"parameter": {
370370
"left": {
371371
"type": "Identifier",

tests/fixtures/typescript/basics/class-with-protected-parameter-properties.result.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ module.exports = {
143143
},
144144
"decorators": [],
145145
"accessibility": "protected",
146-
"isReadonly": false,
146+
"readonly": false,
147147
"parameter": {
148148
"type": "Identifier",
149149
"range": [
@@ -215,7 +215,7 @@ module.exports = {
215215
},
216216
"decorators": [],
217217
"accessibility": "protected",
218-
"isReadonly": true,
218+
"readonly": true,
219219
"parameter": {
220220
"type": "Identifier",
221221
"range": [
@@ -287,7 +287,7 @@ module.exports = {
287287
},
288288
"decorators": [],
289289
"accessibility": "protected",
290-
"isReadonly": false,
290+
"readonly": false,
291291
"parameter": {
292292
"type": "AssignmentPattern",
293293
"range": [
@@ -395,7 +395,7 @@ module.exports = {
395395
},
396396
"decorators": [],
397397
"accessibility": "protected",
398-
"isReadonly": true,
398+
"readonly": true,
399399
"parameter": {
400400
"type": "AssignmentPattern",
401401
"range": [

tests/fixtures/typescript/basics/class-with-public-parameter-properties.result.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ module.exports = {
143143
},
144144
"decorators": [],
145145
"accessibility": "public",
146-
"isReadonly": false,
146+
"readonly": false,
147147
"parameter": {
148148
"type": "Identifier",
149149
"range": [
@@ -215,7 +215,7 @@ module.exports = {
215215
},
216216
"decorators": [],
217217
"accessibility": "public",
218-
"isReadonly": true,
218+
"readonly": true,
219219
"parameter": {
220220
"type": "Identifier",
221221
"range": [
@@ -287,7 +287,7 @@ module.exports = {
287287
},
288288
"decorators": [],
289289
"accessibility": "public",
290-
"isReadonly": false,
290+
"readonly": false,
291291
"parameter": {
292292
"type": "AssignmentPattern",
293293
"range": [
@@ -395,7 +395,7 @@ module.exports = {
395395
},
396396
"decorators": [],
397397
"accessibility": "public",
398-
"isReadonly": true,
398+
"readonly": true,
399399
"parameter": {
400400
"type": "AssignmentPattern",
401401
"range": [

tests/fixtures/typescript/basics/class-with-readonly-parameter-properties.result.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ module.exports = {
143143
},
144144
"decorators": [],
145145
"accessibility": null,
146-
"isReadonly": true,
146+
"readonly": true,
147147
"parameter": {
148148
"type": "Identifier",
149149
"range": [
@@ -215,7 +215,7 @@ module.exports = {
215215
},
216216
"decorators": [],
217217
"accessibility": null,
218-
"isReadonly": true,
218+
"readonly": true,
219219
"parameter": {
220220
"type": "AssignmentPattern",
221221
"range": [

tests/fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.result.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ module.exports = {
7070
}
7171
},
7272
"accessibility": "public",
73-
"isReadonly": false,
73+
"readonly": false,
7474
"parameter": {
7575
"type": "Identifier",
7676
"range": [
@@ -107,7 +107,7 @@ module.exports = {
107107
}
108108
},
109109
"accessibility": "private",
110-
"isReadonly": false,
110+
"readonly": false,
111111
"parameter": {
112112
"type": "Identifier",
113113
"range": [

0 commit comments

Comments
 (0)