question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JSDOC Property Descriptions

See original GitHub issue

Having compatibility and initial values for each property in the jsdocs is great! One thing that would make these definitions stronger is if they had short descriptions for each. There are way too many css properties for any one developer/designer to memorize, so in TypeStyle we put a short little blurb about the property to give it some context:

  /**
   * Background-size specifies the size of a background image
   * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-size
   */
  backgroundSize?: 'auto' | 'cover' | 'contain' | CSSLength | CSSPercentage | CSSGlobalValues;

The short description lets the developer know that backgroundSize controls the background image.

Since the underlying types are from MDN’s browser compat tables, I realize this information is not readily available from that datasource. I propose adding a json file to store the description or finding a datasource for it and then adding it to the output.

I can take a swing at creating a PR for it.

https://github.com/typestyle/typestyle/pull/245

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
notoriousb1tcommented, May 8, 2018

I plugged in turndown (removing anchors) and that seems to work well. https://github.com/notoriousb1t/mdn-crawler/blob/master/summaries.json

I plan to start integrating this tonight

1reaction
notoriousb1tcommented, May 8, 2018

Sounds good to me. I will update the PR tonight with those changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use JSDoc: @property
The @property tag is a way to easily document a list of static properties of a class, namespace or other object. Normally JSDoc...
Read more >
How to describe "object" arguments in jsdoc? - Stack Overflow
This syntax is ideal for objects that are used only as parameters for this function and don't require further description of each property....
Read more >
How to document object properties with JSDoc
If a function accepts an object as an argument, how do you document that objects properties with JSDoc? Let's dig in!
Read more >
JSDoc Reference - TypeScript: Documentation
The list below outlines which constructs are currently supported when using JSDoc annotations to provide type information in JavaScript files.
Read more >
How to describe “object” arguments in jsdoc? - GeeksforGeeks
How to describe “object” arguments in jsdoc? · To document objects with specified properties: Syntax: · To document objects with specified ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found