@@ -33,6 +33,7 @@ expectType<Promise<string[]>>(globby('*.tmp', {
3333expectType < Promise < string [ ] > > ( globby ( '*.tmp' , { gitignore : true } ) ) ;
3434expectType < Promise < string [ ] > > ( globby ( '*.tmp' , { ignore : [ '**/b.tmp' ] } ) ) ;
3535expectType < Promise < GlobEntry [ ] > > ( globby ( '*.tmp' , { objectMode : true } ) ) ;
36+ expectType < Promise < GlobEntry [ ] > > ( globby ( '*.tmp' , { stats : true } ) ) ;
3637
3738// Globby (sync)
3839expectType < string [ ] > ( globbySync ( '*.tmp' ) ) ;
@@ -49,6 +50,7 @@ expectType<string[]>(globbySync('*.tmp', {
4950expectType < string [ ] > ( globbySync ( '*.tmp' , { gitignore : true } ) ) ;
5051expectType < string [ ] > ( globbySync ( '*.tmp' , { ignore : [ '**/b.tmp' ] } ) ) ;
5152expectType < GlobEntry [ ] > ( globbySync ( '*.tmp' , { objectMode : true } ) ) ;
53+ expectType < GlobEntry [ ] > ( globbySync ( '*.tmp' , { stats : true } ) ) ;
5254
5355// Globby (stream)
5456expectType < GlobbyStream > ( globbyStream ( '*.tmp' ) ) ;
@@ -65,7 +67,9 @@ expectType<GlobbyStream>(globbyStream('*.tmp', {
6567expectType < GlobbyStream > ( globbyStream ( '*.tmp' , { gitignore : true } ) ) ;
6668expectType < GlobbyStream > ( globbyStream ( '*.tmp' , { ignore : [ '**/b.tmp' ] } ) ) ;
6769expectType < GlobbyEntryStream > ( globbyStream ( '*.tmp' , { objectMode : true } ) ) ;
70+ expectType < GlobbyEntryStream > ( globbyStream ( '*.tmp' , { stats : true } ) ) ;
6871expectType < GlobbyEntryStream > ( globbyStream ( '*.tmp' , { objectMode : true , gitignore : true } ) ) ;
72+ expectType < GlobbyEntryStream > ( globbyStream ( '*.tmp' , { stats : true , gitignore : true } ) ) ;
6973
7074// eslint-disable-next-line unicorn/prefer-top-level-await
7175( async ( ) => {
@@ -88,6 +92,16 @@ expectType<GlobbyEntryStream>(globbyStream('*.tmp', {objectMode: true, gitignore
8892 expectType < GlobEntry [ ] > ( streamResult ) ;
8993} ) ( ) ;
9094
95+ // eslint-disable-next-line unicorn/prefer-top-level-await
96+ ( async ( ) => {
97+ const streamResult = [ ] ;
98+ for await ( const entry of globbyStream ( '*.tmp' , { stats : true } ) ) {
99+ streamResult . push ( entry ) ;
100+ }
101+
102+ expectType < GlobEntry [ ] > ( streamResult ) ;
103+ } ) ( ) ;
104+
91105// GenerateGlobTasks
92106expectType < Promise < GlobTask [ ] > > ( generateGlobTasks ( '*.tmp' ) ) ;
93107expectType < Promise < GlobTask [ ] > > ( generateGlobTasks ( [ 'a.tmp' , '*.tmp' , '!{c,d,e}.tmp' ] ) ) ;
0 commit comments