JSDoc encounters issues when processing *.js files that are produced from *.ts files

I am currently working on creating documentation for a straightforward typescript class:

export class Address
{
    /**
     * @param street { string } - excluding building number
     * @param city { string } - abbreviations like "LA" are acceptable 
     */
    constructor(
        private readonly street: string,
        private readonly city: string){}
}

export class Person
{
    /**
     * @param name { string } - first name only
     * @param address { Address } - residential address
     */
    constructor(
        private readonly name: string,
        private readonly address: Address){}
}

After compiling it to *.js and generating a *.d.ts file:

$ ./node_modules/.bin/tsc --declaration main.ts

Upon running the documentation generation process, I am only getting the text Home displayed and nothing else:

$ ./node_modules/.bin/jsdoc --verbose ./main.js

Answer №1

I stored my ".js" and ".d.ts" files in a folder named "dist".

If you take a look at my jsdoc config file, it might be helpful. I used the "clean-jsdoc-theme" here, but it will also function with the default theme.

Here is the content of jsdoc.json:-

{
  "source": {
    "include": [
      "dist/User/index.js",
      "dist/Organization/index.js",
      "dist/Application/index.js",
      "dist/EndDevice/index.js",
      "dist/Gateway/index.js",
      "dist/Interfaces/Doc Common/docApp.interface.js",
      "dist/Interfaces/Doc Common/docEndDevice.interface.js"
    ]
  },
  "plugins": ["plugins/markdown"],
  "templates": {
    "cleverLinks": true,
    "monospaceLinks": true
  },
  "opts": {
    "template": "node_modules/clean-jsdoc-theme",
    "readme": "./readme/readme.md",
    "recurse": true,
    "destination": "./docs/",
    "encoding": "utf8",
    "verbose": true,
    "theme_opts": {
      "default_theme": "dark",
      "search": true,
      "title": "Test",
      "homepageTitle": "Docs"
    }
  },
  "markdown": {
    "hardwrap": false,
    "idInHeadings": true
  }
}

Also, check out my package.json file:-

  "scripts": {
    "build": "jsdoc -c jsdoc.json",
  },

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Struggling to remove the image tag from the jQuery ajax response

My web app is designed to send an ajax post request to a PHP script, which then returns a chunk of HTML data. This HTML includes an image and a table of information. The challenge I'm facing is how to extract the image from the rest of the HTML so tha ...

How can I loop through JSON in AngularJS to populate fields without knowing the key value?

Here is the data structure that I'm working with: { "0": { "keyword": "flower", "short_desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "pt_value": "5" }, "1": { "keyword": "tree", "short_desc": "Lorem ipsum dolor sit amet, consecte ...

Tips for switching the status of each item as I navigate the page with the tab key

I am facing an issue with my list of items that have hidden content appearing on hover. I want to achieve the same functionality while tabbing through my page, but currently, all hidden content appears at once. Check out a live example of my code here jQ ...

Is it possible to simultaneously utilize a Node.js server and an ASP.NET web service?

Although I have experience in developing with .NET, I am new to Node.js and intrigued by its advantages. I believe it is a great way to maintain code and promote reusability. However, I am faced with a dilemma. I understand that Node.js allows for creatin ...

What specific event do I require for the onChange event in React using TypeScript?

I'm facing a problem while working with React TypeScript. I need to type the onChange event for a select element, but the data is coming from event.value instead of event.target.value. What should be the appropriate event to use in this case? Below i ...

Iterating through typescript enums in Vue using v-for

Why is the v-for loop over an enum displaying both names and values? Is there a way to iterate only over the keys? export enum Colors { "RED" = 1, "BLUE" = 2, "GREEN" = 3, } <template> <div> <v ...

Facing issues using Angular 5 for PUT requests due to 401 errors

When attempting to update data using the PUT Method in my angular service and express routes, I encountered a 401 error. Here is my service code: //401 makeAdmin(_id) { this.loadToken() let headers = new Headers() headers.append('Authorization& ...

Design cards in a particular sequence using either bootstrap or CSS

I am currently developing a blog website and I need assistance with arranging the cards in this specific order: https://i.sstatic.net/Ffpcb.png Despite my efforts using Bootstrap, I am unable to achieve the desired layout. Here is the code I have so far: ...

Issue encountered while trying to determine the Angular version due to errors in the development packages

My ng command is displaying the following version details: Angular CLI: 10.2.0 Node: 12.16.3 OS: win32 x64 Angular: <error> ... animations, cdk, common, compiler, compiler-cli, core, forms ... language-service, material, platform-browser ... platfor ...

Embed API allows users to showcase a variety of charts all on one page

I am trying to incorporate two google analytics timeline charts using the embed API on a single page. However, I am facing an issue where only one chart is appearing. The first chart should display bounce rate data and the second chart should display sessi ...

Step-by-step guide: Mocking a fetch request in Jest using React with TypeScript

In my project, I am developing a react+ts application which allows users to search for other users using the GitHub API. The search input element in my app has the following structure : <input type="text" placeholder="Search us ...

What exactly is the function of the NextPage feature in Next.js?

Recently, I began incorporating TypeScript into my Next project. Could someone clarify the purpose of the following code snippets for me? import { NextPage } from 'next'; export const Page: NextPage = () => {} After reviewing the documentation ...

Error message: "Angular requires either importing or local installation"

For my ionic application development, I encountered an issue while trying to link pages together in the ionic creator. The error message on the .ts file is: typescript: src/pages/home/home.ts, line: 4 Individual declarations in merged declar ...

Loading STL files can sometimes lead to issues when accessing the world matrix incorrectly

While working on a three.js project, I encountered some issues with loading vertices from an STL file and converting them to world coordinates. It seems like the matrix application isn't working properly, and I suspect it could be related to the loadi ...

Sharing properties across various components with Next.js

I'm still getting the hang of using Next.js and encountering issues with sharing data between components. Currently, I have a setup involving three components: //index.js function App() { const choices = [] for (let i = 1; i < 101; i++) { ...

JavaScript: The delayed submission feature is malfunctioning

Visit this link When using JSFiddle, a strange list of errors is generated (see pic here). However, the auto-submit feature on my page works fine, but it lacks the specified delay. Thank you in advance for any assistance. <form id='formBlokUziv&a ...

Flask and the steps to modify CORS header

While working on my localhost, I came across a CORS error when building an application to handle search queries for a different domain. The specific error was: "Cross Origin Request Blocked... (Reason: CORS header 'Access-Control-Allow-Origin' mi ...

Unable to extract numerical value from object using Dropdown (Angular 4)

When I retrieve data from an API, everything works smoothly except when I try to bind my JSON option number value into the [value] tag. Here's an example: SUCCESSFUL (data retrieved from API is selected in the option) <select [(ngModel)]="data.fr ...

Custom AngularJS menu directive using a JSON file to generate submenus

As a newcomer to angularJs, I am looking to create a dynamic menu with submenus using a .json file. It's important for me to be able to easily add new menus and submenus through the same .json document. <a href="#" ng-repeat="item in menuHeader"&g ...

What is the process of incorporating external links into an angular application?

Attempting to embed an external URL within my Angular app using an iframe has resulted in the following issue: https://i.sstatic.net/liSmX.png The error message reads as follows: https://i.sstatic.net/u9GWw.png Below is the template where I am trying t ...