From 96c12bf298c0d482cec3f1f994741de8ddeaff5b Mon Sep 17 00:00:00 2001 From: novlan1 <1576271227@qq.com> Date: Mon, 26 Sep 2022 09:37:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BF=BD=E7=95=A5jsdoc=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ package.json | 2 +- src/base/list/parse-list.ts | 4 ++-- src/wecom-robot/base.ts | 2 +- src/wecom-robot/helper.ts | 2 +- src/wecom-robot/send-img.ts | 1 - 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index f2cf1d84..ecb4dbd2 100644 --- a/.gitignore +++ b/.gitignore @@ -109,3 +109,5 @@ package-lock.json .env.local /test.js +repo/ +docs/ diff --git a/package.json b/package.json index 0f89f31b..31039d05 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "scripts": { "build": "gulp build", "api": "api-extractor run", - "docs:gen": "jsdoc -c jsdoc.json", + "docs:gen": "jsdoc -c jsdoc.json || true", "test": "jest --coverage --verbose -u", "lint": "eslint --ext .js,.ts --format=pretty ./src", "lint:fix": "eslint --fix --ext .js,.ts --format=pretty ./src", diff --git a/src/base/list/parse-list.ts b/src/base/list/parse-list.ts index 19516feb..98e83cdd 100644 --- a/src/base/list/parse-list.ts +++ b/src/base/list/parse-list.ts @@ -107,7 +107,7 @@ function markMaxAndMinOfObj({ values, value, obj }) { /** * 获取相对上次的比例 - * @param data + * @param data - 输入数据 * * [{ * Project: { value: 'mj-match', name: 'Project' }, @@ -123,7 +123,7 @@ function markMaxAndMinOfObj({ values, value, obj }) { }, } }] - * @param preDataMap + * @param preDataMap - 上次数据的map * * { 'mj-match': { diff --git a/src/wecom-robot/base.ts b/src/wecom-robot/base.ts index 9e0bb703..77c70e40 100644 --- a/src/wecom-robot/base.ts +++ b/src/wecom-robot/base.ts @@ -3,7 +3,7 @@ import { sendToRobot } from './helper' /** * 给机器人发送普通消息 * @param config - { webhookUrl, chatId, alias, content } - * @returns + * @returns Promise */ export function sendWxRobotMsg({ webhookUrl, chatId, alias, content }) { return new Promise((resolve, reject) => { diff --git a/src/wecom-robot/helper.ts b/src/wecom-robot/helper.ts index d3e8f076..24e9e3c1 100644 --- a/src/wecom-robot/helper.ts +++ b/src/wecom-robot/helper.ts @@ -4,7 +4,7 @@ const axios = require('axios') * 给机器人发消息的基本方法 * * @param config - 包含webhookUrl, params - * @returns + * @returns Promise */ export function sendToRobot({ webhookUrl, params }): any { return new Promise((resolve, reject) => { diff --git a/src/wecom-robot/send-img.ts b/src/wecom-robot/send-img.ts index f8f84414..3b3e6803 100644 --- a/src/wecom-robot/send-img.ts +++ b/src/wecom-robot/send-img.ts @@ -4,7 +4,6 @@ import { saveBase64ImgToFile, getImgMd5 } from '../node-img' /** * 发送企业微信机器人base64图片,其实就是先保存到本地,然后生成md5,最后发送 * @param param0 - * @returns */ export async function sendWxRobotBase64Img({ img,