1const waitForSyncData = () => { 2 return new Promise((resolve, reject) => {
3 const timeout = 2000;
4 setTimeout(() => {
16 })
17}
18
19const init = async () => { 20 const browserSyncData = await waitForSyncData();
21 console.log(browserSyncData);
22 const renderOptions = browserSyncData.iconRenderOptions;
453 }
454}
455
456const streamChatObserverHandler = (mutationList, observer) => {457 if(isChatHidden)
458 {
459 logger.info(`Chat area is recovered!`);
118}
119
120
121const insertTextToInputArea = (text) => {122 inputArea.focus();
123 const dataTransfer = new DataTransfer();
124 dataTransfer.setData("text", text);
11}
12
13
14const chatScrollByOne = () => { 15 let scrollHeight = 100;
16 if(iconRenderOptions.type === 0)
17 {
It is recommended to have documentation comments above, or right inside a function/class declaration. This helps developers, users and even the author understand the purpose of a code snippet or API function in the future.
NOTE: If you want to stop this issue from getting raised on certain constructs (arrow functions, class expressions, methods etc.), consider using the skipdoccoverage option under the analyzers.meta
property in your .deepsource.toml
file.
For example, the following configuration will silence this issue for class expressions and method definitions:
[analyzers.meta]
skip_doc_coverage = ["class-expression", "method-definition"]
function sum(a, b) {
return a + b;
}
/**
* Function to add two numbers
* @param a The first number to add
* @param b The second number to add
* @returns The sum of two numbers
*/
function sum(a, b) {
return a + b;
}