microsoft / microsoft/TypeScript-TmLanguage
No syntax highligthing in js files for JSDoc @property
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 471
- Forks
- 149
- PR merge metrics
- No merged PRs in 30d
Description
A Visual Studio customer has reported an issue regarding syntax highlighting for @property tags in JSDoc comments:
https://developercommunity2.visualstudio.com/t/no-syntax-highligthing-in-js-files-for-/1345869
The sample code referred to is:
/**
* @typedef {Object} SpecialType - creates a new type named 'SpecialType'
* @property {string} prop1 - a string property of SpecialType
* @property {number} prop2 - a number property of SpecialType
* @property {number=} prop3 - an optional number property of SpecialType
* @prop {number} [prop4] - an optional number property of SpecialType
* @prop {number} [prop5=42] - an optional number property of SpecialType with default
*/
/** @type {SpecialType} */
var specialTypeObject;
specialTypeObject.prop3;
🙁 Actual behavior
No syntax highlighting for @property tags
🙂 Expected behavior
Syntax highlighting similar to what is shown in the docs: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#typedef-callback-and-param
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 with the TextMate grammar files in this repository and reproduce the supplied JavaScript JSDoc sample in a supported editor. Trace how JSDoc tags are highlighted, then make @property and its @prop form match the expected TypeScript documentation highlighting and verify the sample visually.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100