All public API elements must be thoroughly documented with JSDoc annotations that clearly explain their purpose, parameters, return values, and default behaviors. Documentation should be precise, matching the actual code behavior rather than making assumptions or using misleading descriptions.
All public API elements must be thoroughly documented with JSDoc annotations that clearly explain their purpose, parameters, return values, and default behaviors. Documentation should be precise, matching the actual code behavior rather than making assumptions or using misleading descriptions.
When adding new parameters or methods:
For example, when adding a new configuration option:
/**
* @!attribute signatureCache
* @return [Boolean] whether the signature to sign requests with (overriding
* the API configuration) is cached. Only applies to the signature version 'v4'.
* Defaults to `true`.
*/
/**
* @option options signatureCache [Boolean] whether the signature to sign
* requests with (overriding the API configuration) is cached. Only applies
* to the signature version 'v4'. Defaults to `true`.
*/
For methods that return promises, clearly document what the promise resolves to:
/**
* @!method getSignedUrlPromise()
* Returns a 'thenable' promise that will be resolved with a pre-signed URL.
*/
Ensure that if you’re making an API public, all necessary documentation is added and the component is properly exported so it appears in generated documentation.
Enter the URL of a public GitHub repository