diff --git a/main.d.ts b/main.d.ts index c6d7257..4f721fe 100644 --- a/main.d.ts +++ b/main.d.ts @@ -463,7 +463,7 @@ export namespace helper { * sync files to target directory from source directory * @param source * @param target - * @param ext default value is = '*' + * @param ext default value is = '*', js|ts ... * @param reback default value if true */ function _sync(source: string, target: string, ext?: string, reback?: boolean): Promise; @@ -472,7 +472,7 @@ export namespace helper { * list files in some directory * @param dir * @param full - * @param ext + * @param ext .js|.ts */ function _list(dir: string, full?: boolean, ext?: string): Promise; @@ -520,7 +520,7 @@ export namespace helper { /** * search some files by extension * @param dir - * @param ext + * @param ext js|ts * @param recur */ function _search(dir: string, ext?: string, recur?: boolean): Promise; diff --git a/src/helper/fs.js b/src/helper/fs.js index 37f2fe8..1b781c9 100644 --- a/src/helper/fs.js +++ b/src/helper/fs.js @@ -93,9 +93,8 @@ async function _copy(source, target, recur = false) { /** * search files in the directory - * @example js|ts ... * @param {*} dir - * @param {*} ext + * @param {*} ext js|ts ... * @param {*} recur * @returns */ @@ -122,10 +121,9 @@ async function _search(dir, ext = '*', recur = true) { /** * find files in the directory with deep one level - * @example .js|.ts * @param {*} dir * @param {*} full - * @param {*} ext + * @param {*} ext .js|.ts * @returns */ async function _list(dir, full = false, ext = '*') { @@ -191,10 +189,9 @@ async function _md5(filepath, charset = 'utf8') { /** * file system sync - * @example js|ts ... * @param {*} source * @param {*} target - * @param {*} ext + * @param {*} ext js|ts ... * @param {*} reback */ async function _sync(source, target, ext = '*', reback = true) {