Skip to content

Commit

Permalink
fix: only export one thing from glob source (#223)
Browse files Browse the repository at this point in the history
Fixes:

```
node_modules/ipfs-utils/dist/src/files/glob-source.d.ts:2:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.

2 export = _exports;
```
  • Loading branch information
achingbrain authored Nov 18, 2022
1 parent e0b3493 commit fbbf8f0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/files/glob-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@ const glob = require('it-glob')
const Path = require('path')
const errCode = require('err-code')

/**
* @typedef {import('ipfs-unixfs').MtimeLike} MtimeLike
* @typedef {import('../types').GlobSourceOptions} GlobSourceOptions
* @typedef {import('../types').GlobSourceResult} GlobSourceResult
*/

/**
* Create an async iterator that yields paths that match requested glob pattern
*
* @param {string} cwd - The directory to start matching the pattern in
* @param {string} pattern - Glob pattern to match
* @param {GlobSourceOptions} [options] - Optional options
* @returns {AsyncGenerator<GlobSourceResult, void, unknown>} File objects that match glob
* @param {import('../types').GlobSourceOptions} [options] - Optional options
* @returns {AsyncGenerator<import('../types').GlobSourceResult, void, unknown>} File objects that match glob
*/
module.exports = async function * globSource (cwd, pattern, options) {
options = options || {}
Expand Down

0 comments on commit fbbf8f0

Please sign in to comment.