jsdoc / jsdoc/jsdoc

How to document properties with colon?

Open
#2,094 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
15.5k
Forks
1.5k
Avg merge
10d 23h
Merged PRs (30d)
1

Description

I recently have to work with RSS/XML objects that have colons in the property name e.g. dc:creator. How is this expressed in JSDocs? Whenever I try adding dc:creator to typed object, it's not recognized.

Input code
/**
 * @typedef {object} XMLChannel
 * @property {string} [dc:creator]
 */
Expected behavior

Output and support by JSDoc integrated tools like VSCode

Current behavior

Outputs nothing + causes error in JSDoc supported tools like VSCode

Contributor guide

Open the contributing guide

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 reproducing the provided XMLChannel typedef and trace how the @property name dc:creator is parsed. Confirm the behavior in JSDoc-supported tooling such as VSCode; done means the colon-containing property is accepted and produces the expected typed-object output without errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.