@@ -6,24 +6,19 @@ const glob = require('it-glob')
6
6
const Path = require ( 'path' )
7
7
const errCode = require ( 'err-code' )
8
8
9
+ /**
10
+ * @typedef {import('ipfs-unixfs').MtimeLike } MtimeLike
11
+ * @typedef {import('../types').GlobSourceOptions } GlobSourceOptions
12
+ * @typedef {import('../types').GlobSourceResult } GlobSourceResult
13
+ */
14
+
9
15
/**
10
16
* Create an async iterator that yields paths that match requested glob pattern
11
17
*
12
18
* @param {string } cwd - The directory to start matching the pattern in
13
19
* @param {string } pattern - Glob pattern to match
14
- * @param {Object } [options] - Optional options
15
- * @param {boolean } [options.hidden] - Include .dot files in matched paths
16
- * @param {boolean } [options.followSymlinks] - follow symlinks
17
- * @param {boolean } [options.preserveMode] - preserve mode
18
- * @param {boolean } [options.preserveMtime] - preserve mtime
19
- * @param {number } [options.mode] - mode to use - if preserveMode is true this will be ignored
20
- * @param {import('ipfs-unixfs').MtimeLike } [options.mtime] - mtime to use - if preserveMtime is true this will be ignored
21
- * @returns {AsyncGenerator<{
22
- * path: string;
23
- * content: AsyncIterable<Buffer> | undefined;
24
- * mode: number | undefined;
25
- * mtime: import("ipfs-unixfs/types/src/types").MtimeLike | undefined;
26
- * }, void, unknown>} File objects that match glob
20
+ * @param {GlobSourceOptions } [options] - Optional options
21
+ * @returns {AsyncGenerator<GlobSourceResult, void, unknown> } File objects that match glob
27
22
*/
28
23
module . exports = async function * globSource ( cwd , pattern , options ) {
29
24
options = options || { }
0 commit comments