Guidance for single-line comments
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5k
- Forks
- 162
- Avg merge
- 17h 24m
- Merged PRs (30d)
- 8
Description
In the documentation there three types of tags
- Block tags
- Modifier tags
- Inline tags
https://tsdoc.org/pages/spec/tag_kinds/
However none of these mention whether single-line comments are supported? They are all multi-line comment blocks.
It's common in many companies to add single-line comments to add context to code, which may not be actually generated in customer facing documentation.
In the Angular source code I see the use of both multiline and single line:
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// This file intentionally left blank. It is used to load nothing in some cases.
// Such as parse5/index is redirected here instead of loading into browser.
export let __empty__: any;
https://github.com/angular/angular/blob/master/packages/empty.ts
But they also have another file using a different standard:
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/** Dummy typings for systemjs. */
declare var System: any;
https://github.com/angular/angular/blob/master/packages/system.d.ts
It would be great to clarify what the standard is for single-line comments, recommended uses-cases etc.
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 tag-kinds guidance at tsdoc.org/pages/spec/tag_kinds/ and compare its treatment of multiline blocks with the Angular examples linked in the issue. Clarify whether single-line comments are supported, when they should be used, and whether they are included in generated documentation; done means the documentation states the standard and recommended use cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100