globby icon indicating copy to clipboard operation
globby copied to clipboard

type declarations do not account for fs.Stats[] return type

Open starpit opened this issue 6 years ago • 2 comments

fast-glob supports { stats: true }, which yields fs.Stats objects as opposed to strings. it looks like index.d.ts does not account for this?

Type 'string[]' is not assignable to type 'Stats[]'. Type 'string' is not assignable to type 'Stats'.

starpit avatar Jan 03 '20 23:01 starpit

Probably just an oversight. PR welcome to fix this.

sindresorhus avatar Jan 06 '20 08:01 sindresorhus

@starpit I had a go at fixing this in #173, let me know if you see any issues. I am new to to typescript.

alex-page avatar Apr 03 '21 05:04 alex-page