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

Commit

Permalink
Fix: Label readonly class properties (fixes #302)
Browse files Browse the repository at this point in the history
  • Loading branch information
soda0289 committed Jun 2, 2017
1 parent 3dcba7d commit 32634f1
Show file tree
Hide file tree
Showing 68 changed files with 8,445 additions and 7,694 deletions.
1 change: 1 addition & 0 deletions lib/convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ module.exports = function convert(config) {
computed: nodeUtils.isComputedProperty(node.name),
static: nodeUtils.hasStaticModifierFlag(node),
accessibility: nodeUtils.getTSNodeAccessibility(node),
readonly: nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node),
decorators: convertDecorators(node.decorators),
typeAnnotation: (node.type) ? convertTypeAnnotation(node.type) : null
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,58 +160,58 @@ module.exports = {
"name": "Promise"
},
"typeParameters": {
"type": "TypeParameterInstantiation",
"range": [
75,
83
],
"loc": {
"end": {
"column": 44,
"line": 2
},
"start": {
"column": 36,
"line": 2
"line": 2,
"column": 36
},
"end": {
"line": 2,
"column": 44
}
},
"params": [
{
"id": {
"loc": {
"end": {
"column": 43,
"line": 2
},
"start": {
"column": 37,
"line": 2
}
"type": "GenericTypeAnnotation",
"range": [
76,
82
],
"loc": {
"start": {
"line": 2,
"column": 37
},
"end": {
"line": 2,
"column": 43
}
},
"id": {
"type": "TSStringKeyword",
"range": [
76,
82
],
"type": "TSStringKeyword"
},
"loc": {
"end": {
"column": 43,
"line": 2
},
"start": {
"column": 37,
"line": 2
"loc": {
"start": {
"line": 2,
"column": 37
},
"end": {
"line": 2,
"column": 43
}
}
},
"range": [
76,
82
],
"type": "GenericTypeAnnotation",
"typeParameters": null
}
],
"range": [
75,
83
],
"type": "TypeParameterInstantiation"
]
}
}
},
Expand Down Expand Up @@ -552,4 +552,4 @@ module.exports = {
}
}
]
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ module.exports = {
"computed": false,
"static": false,
"accessibility": null,
"readonly": false,
"decorators": [],
"typeAnnotation": null
},
Expand Down Expand Up @@ -149,6 +150,7 @@ module.exports = {
"computed": false,
"static": false,
"accessibility": null,
"readonly": false,
"decorators": [],
"typeAnnotation": null
}
Expand Down Expand Up @@ -410,4 +412,4 @@ module.exports = {
}
}
]
};
};
Loading

0 comments on commit 32634f1

Please sign in to comment.