0

Newbie alert!!

When you require a module in your code such as below and you hover your mouse on a function your calling from that module you get a pop up with some documentation about the function ie parameters, returns and throws etc etc

const AWS = require("aws-sdk");
const cognito = new AWS.CognitoIdentityServiceProvider({ apiVersion: "2016-04-18" });

In my own modules where I have written functions and then required them I have documented each function as per below example

/**
 * Given a user's profile, create a new session (kill any previous sessions)
 * @param profile The users profile
 * @throws Exception if the user is not a valid user.
 */ 

When I hover on the function in the module that contains the function code I can see the documentation box appear.

However when I hover of the function in the module that's actually calling the function I get nothing.

You also get intellisense type functionality so when you type cognito. you get a popup with all the available functions.

Whats missing to get my functions to appear like that also? They are all exported using

module.exports.funcName = funcName;

Anyone?

Thanks in advance

Mark Lloyd
  • 141
  • 2
  • 13
  • 1
    Might help to include the editor you are using along with any editor extensions that may be affecting this functionality. – Kevin B Nov 28 '18 at 21:19
  • Hi @KevinB VS Code is my editor Enabled extensions Bracket Pair Colorizer Cloudformation Debugger for Chrome Docker ESLint GraphQL Import Cost indent-rainbow Quokka SVN – Mark Lloyd Dec 20 '18 at 23:10

1 Answers1

0

Hoping this helps out any other newbies doing silly stuff like I was.

Finally found the answer to my question. Basically my paths on my local laptop were not quite the same as the paths on the build server so my local js files had the paths defined to suit the build server. That meant on the local file that the files would not resolve correctly and therefore would not import the js doc refs.

Once I aligned the paths on local and build server then the files imported correctly and viola JS doc starting working fine.

Doh!

Mark Lloyd
  • 141
  • 2
  • 13