It isn’t super critical that I get this done now, but I’m having issues with getting my hover comments appearing with an npm module I created. I created an issue in the related repository:
opened 03:13PM - 17 Jun 22 UTC
bug
help wanted
The hover behavior should look like what is provided by a library like did-jwt:
…

Instead I am getting something like this where the function description is shown, but the JSDoc comments do not appear:

For more information see: https://code.visualstudio.com/docs/languages/typescript#_jsdoc-support and https://jsdoc.app/
For an example of JSDoc comments that currently do not work see:
https://github.com/bshambaugh/did-key-creator/blob/main/src/encodeDIDkey.ts#L6-L15
```
/**
* Encodes a did:key from bytes
*
* @example
* eencodeDIDfromBytes('p256-pub',new Uint8Array([...])) , or see index.test.ts for constructing Uint8Arrays from strings
*
* @param {CodecName} multicodecName see https://github.com/multiformats/multicodec/blob/master/table.csv for a list of names
* @param {Uint8Array} publicKey public key expressed as byte Array
* @return {string} a did:key, see spec https://w3c-ccg.github.io/did-method-key/ for form
*/
```
For an example of JSDoc comments that currently do work see:
https://github.com/decentralized-identity/did-jwt/blob/master/src/signers/ES256KSigner.ts#L9-L23
```
/**
* Creates a configured signer function for signing data using the ES256K (secp256k1 + sha256) algorithm.
*
* The signing function itself takes the data as a `Uint8Array` or `string` and returns a `base64Url`-encoded signature
*
* @example
* ```typescript
* const sign: Signer = ES256KSigner(process.env.PRIVATE_KEY)
* const signature: string = await sign(data)
* ```
*
* @param {String} privateKey a private key as `Uint8Array`
* @param {Boolean} recoverable an optional flag to add the recovery param to the generated signatures
* @return {Function} a configured signer function `(data: string | Uint8Array): Promise<string>`
*/
```
system
Closed
December 17, 2022, 4:22am
2
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.