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

Commit 3dcba7d

Browse files
authored
Breaking: Change isReadonly to readonly (fixes #284) (#285)
1 parent bc9225f commit 3dcba7d

8 files changed

+19
-19
lines changed

lib/convert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ module.exports = function convert(config) {
11211121
range: [node.getStart(), node.end],
11221122
loc: nodeUtils.getLoc(node, ast),
11231123
accessibility: nodeUtils.getTSNodeAccessibility(node),
1124-
isReadonly: nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node),
1124+
readonly: nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node),
11251125
static: nodeUtils.hasModifier(SyntaxKind.StaticKeyword, node),
11261126
export: nodeUtils.hasModifier(SyntaxKind.ExportKeyword, node),
11271127
parameter: result

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ module.exports = {
107107
}
108108
},
109109
"accessibility": null,
110-
"isReadonly": false,
110+
"readonly": false,
111111
"static": false,
112112
"export": true,
113113
"parameter": {

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,9 +113,9 @@ module.exports = {
113113
},
114114
"decorators": [],
115115
"accessibility": "private",
116-
"isReadonly": false,
117116
"static": false,
118117
"export": false,
118+
"readonly": false,
119119
"parameter": {
120120
"type": "Identifier",
121121
"range": [
@@ -187,9 +187,9 @@ module.exports = {
187187
},
188188
"decorators": [],
189189
"accessibility": "private",
190-
"isReadonly": true,
191190
"static": false,
192191
"export": false,
192+
"readonly": true,
193193
"parameter": {
194194
"type": "Identifier",
195195
"range": [
@@ -261,9 +261,9 @@ module.exports = {
261261
},
262262
"decorators": [],
263263
"accessibility": "private",
264-
"isReadonly": false,
265264
"static": false,
266265
"export": false,
266+
"readonly": false,
267267
"parameter": {
268268
"left": {
269269
"type": "Identifier",
@@ -371,9 +371,9 @@ module.exports = {
371371
},
372372
"decorators": [],
373373
"accessibility": "private",
374-
"isReadonly": true,
375374
"static": false,
376375
"export": false,
376+
"readonly": true,
377377
"parameter": {
378378
"left": {
379379
"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,9 +143,9 @@ module.exports = {
143143
},
144144
"decorators": [],
145145
"accessibility": "protected",
146-
"isReadonly": false,
147146
"static": false,
148147
"export": false,
148+
"readonly": false,
149149
"parameter": {
150150
"type": "Identifier",
151151
"range": [
@@ -217,9 +217,9 @@ module.exports = {
217217
},
218218
"decorators": [],
219219
"accessibility": "protected",
220-
"isReadonly": true,
221220
"static": false,
222221
"export": false,
222+
"readonly": true,
223223
"parameter": {
224224
"type": "Identifier",
225225
"range": [
@@ -291,9 +291,9 @@ module.exports = {
291291
},
292292
"decorators": [],
293293
"accessibility": "protected",
294-
"isReadonly": false,
295294
"static": false,
296295
"export": false,
296+
"readonly": false,
297297
"parameter": {
298298
"type": "AssignmentPattern",
299299
"range": [
@@ -401,9 +401,9 @@ module.exports = {
401401
},
402402
"decorators": [],
403403
"accessibility": "protected",
404-
"isReadonly": true,
405404
"static": false,
406405
"export": false,
406+
"readonly": true,
407407
"parameter": {
408408
"type": "AssignmentPattern",
409409
"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,9 +143,9 @@ module.exports = {
143143
},
144144
"decorators": [],
145145
"accessibility": "public",
146-
"isReadonly": false,
147146
"static": false,
148147
"export": false,
148+
"readonly": false,
149149
"parameter": {
150150
"type": "Identifier",
151151
"range": [
@@ -217,9 +217,9 @@ module.exports = {
217217
},
218218
"decorators": [],
219219
"accessibility": "public",
220-
"isReadonly": true,
221220
"static": false,
222221
"export": false,
222+
"readonly": true,
223223
"parameter": {
224224
"type": "Identifier",
225225
"range": [
@@ -291,9 +291,9 @@ module.exports = {
291291
},
292292
"decorators": [],
293293
"accessibility": "public",
294-
"isReadonly": false,
295294
"static": false,
296295
"export": false,
296+
"readonly": false,
297297
"parameter": {
298298
"type": "AssignmentPattern",
299299
"range": [
@@ -401,9 +401,9 @@ module.exports = {
401401
},
402402
"decorators": [],
403403
"accessibility": "public",
404-
"isReadonly": true,
405404
"static": false,
406405
"export": false,
406+
"readonly": true,
407407
"parameter": {
408408
"type": "AssignmentPattern",
409409
"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,9 +143,9 @@ module.exports = {
143143
},
144144
"decorators": [],
145145
"accessibility": null,
146-
"isReadonly": true,
147146
"static": false,
148147
"export": false,
148+
"readonly": true,
149149
"parameter": {
150150
"type": "Identifier",
151151
"range": [
@@ -217,9 +217,9 @@ module.exports = {
217217
},
218218
"decorators": [],
219219
"accessibility": null,
220-
"isReadonly": true,
221220
"static": false,
222221
"export": false,
222+
"readonly": true,
223223
"parameter": {
224224
"type": "AssignmentPattern",
225225
"range": [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ module.exports = {
107107
}
108108
},
109109
"accessibility": null,
110-
"isReadonly": false,
110+
"readonly": false,
111111
"static": true,
112112
"export": false,
113113
"parameter": {

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
@@ -69,9 +69,9 @@ module.exports = {
6969
}
7070
},
7171
"accessibility": "public",
72-
"isReadonly": false,
7372
"static": false,
7473
"export": false,
74+
"readonly": false,
7575
"parameter": {
7676
"type": "Identifier",
7777
"range": [
@@ -108,9 +108,9 @@ module.exports = {
108108
}
109109
},
110110
"accessibility": "private",
111-
"isReadonly": false,
112111
"static": false,
113112
"export": false,
113+
"readonly": false,
114114
"parameter": {
115115
"type": "Identifier",
116116
"range": [

0 commit comments

Comments
 (0)