microsoft / microsoft/tsdoc

tsickle's JSDoc parser / Closure Compiler syntax

Open
#33 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

general discussion tool scenario
Dominant language
TypeScript
Stars
5k
Forks
162
Avg merge
17h 24m
Merged PRs (30d)
8

Description

[feel free to just close this if not relevant, but I noticed other bugs similar to this]

tsickle is our glue from TypeScript syntax into Closure Compiler syntax. Closure uses JSDoc annotations heavily with its own interpretations and parser, and tsickle understands a subset of that syntax so we can write TypeScript code and pass modified JSDoc comments through to Closure Compiler. (This also relates to issue #23 a bit.)

I don't know if any of this is relevant to your project, but if you're looking to answer any questions about which tags are allowed by Closure Compiler, or our what best guesses at how to parse patterns found in actual source text, you might find https://github.com/angular/tsickle/blob/master/src/jsdoc.ts interesting.

Also, I'd be happy to answer any questions you have in this area. We (tsickle) would be happy to outsource our JSDoc parsing to a standard library like this as long as it parsed all the syntaxes we care about.

With only a few minutes of thought I think the main points worth mentioning are:

  1. Closure Compiler uses curly braces in some places to mark parameterized tags, such as
/**
 * @suppress {checkFoo,checkBar} plain text goes here
 */

Where we want to be able to get at the list of ['checkFoo', 'checkBar'] programmatically.

  1. Closure Compiler has special handling of @license, in that
/**
 * @license text that spans
 * multiple lines
 */

parses as a multi-line @license tag.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the Closure Compiler examples in this issue with tsickle's src/jsdoc.ts and the discussion in issue #23. Clarify whether TSDoc should support parameterized tag values and multiline @license text, then define an agreed scope and acceptance checks for the supported syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.