[JS, TS] Add Monarch support for private identifiers #3919
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3254
This is a very simple solution that just allows the
#
character as the start character of identifiers for all identifiers. I don't know Monarch enough to know if there is a way to constrain this to identifiers in classes, but I doubt there is. In any case if you use the#
character at the start of e.g. a variable name the language service raises an error diagnostic, so that this might not be a problem? Maybe this simple solution is enough for this issue. Let me know what you think, or feel free to discard this.Local Playground Link: https://microsoft.github.io/monaco-editor/playground.html?sourceLanguages=http%3A%2F%2Flocalhost%3A5002%2Fout%2Flanguages%2Famd-tsc#XQAAAAJoAQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscwzblk-_1uhs0-3YGTBOsVJ4S4FwfCDQb5-2uUHXTVAefbVSd9IzaZ_vv9VR9KugsKikU_wkLK9jT_o8SJxwvSkZPE3r8N8C4O8JIRyP6PwIhuEzac9gRZJKV5O9_hRAHvieANI4sR5MKuH1inQaY1HbVLv0DvpOrvrDW6_vt1nHUY5cvnsy0iVQoS8hn2gWkAT4c2hWqFP24-1CdV2IAbzISiaOAa-IE1cC042gJ9VmprZ1KuCo6ic8uz7shuG3cxVt_qoOHa5r6Qz6qCXoH-gAs_coxt1vAO8lWJWMLtOTMA3__77F3Y