1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

补充几处函数头注释

This commit is contained in:
程序员小墨 2024-12-03 23:50:44 +08:00
parent 66c429dd54
commit d3a4b0d79f
2 changed files with 24 additions and 1 deletions

View File

@ -1,9 +1,15 @@
const vscode = require('vscode'); const vscode = require('vscode');
/**
*
*
* @param configKey
* @returns
* @since 2024-07-29
*/
function getUserConfigurations(configKey: string) { function getUserConfigurations(configKey: string) {
const config = vscode.workspace.getConfiguration('variable-conversion'); const config = vscode.workspace.getConfiguration('variable-conversion');
// 获取 disableFormat 配置项
const configValue = config.get(configKey); const configValue = config.get(configKey);
console.log('configValue:', configValue); console.log('configValue:', configValue);
return configValue; return configValue;

View File

@ -1,3 +1,11 @@
/**
* `Array<string>`
*
* @param array1 1
* @param array2 2
* @returns
* @since 2024-04-09
*/
export function isStringArrayEqual(array1: string[], array2: string[]) { export function isStringArrayEqual(array1: string[], array2: string[]) {
if (array1.length !== array2.length) { if (array1.length !== array2.length) {
return false; return false;
@ -12,6 +20,15 @@ export function isStringArrayEqual(array1: string[], array2: string[]) {
return true; return true;
} }
/**
*
*
* [["a", "b"], ["a", "b"], ["c", "d"]] [[ "a", "b"], ["c", "d"]] ["a", "b"]
*
* @param stringArr
* @returns JSON序列化后的字符串比较来判定重复与否
* @since 2024-04-09
*/
export function stringListArrayDuplicateRemoval(stringArr: Array<string[]>): Array<string[]> { export function stringListArrayDuplicateRemoval(stringArr: Array<string[]>): Array<string[]> {
const tempArr: Array<string> = []; const tempArr: Array<string> = [];
const newArr: Array<string[]> = []; const newArr: Array<string[]> = [];