microsoft / microsoft/TypeScript-Sublime-Plugin
"readonly" not highlighted property when appearing after "private" in constructor()
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 236
- Avg merge
- 21d 13h
- Merged PRs (30d)
- 1
Description
This code:
export class Searcher {
private selection: Selection;
constructor(readonly board: Board, private readonly originalSelection: Selection) {
this.selection = {
start: this.originalSelection.start,
focus: this.originalSelection.focus,
axis: this.originalSelection.axis,
};
}
...
}
Appears like this in Sublime Text build 3126, macOS 10.11.5, TypeScript plugin v2.0.1:

I expect the "readonly" and "private" modifiers to have the same highlighting, as red, not orange.
It appears that the syntax highlighter in GitHub also has this problem (as I file this issue):

Should I submit this issue against the TmLanguage definition instead?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the plugin or the linked TypeScript-TmLanguage definition assigns scopes to constructor parameter modifiers, using the reported private readonly example as the reproduction case. Done means readonly receives the same highlighting as private in this ordering, with the responsible syntax definition updated or the issue redirected if it belongs in the linked repository.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100