mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Return type on ignore function was missing and Promise return type was missing from overloads that didn't take a callback. Also extracts out a helper type definitions and provides slightly better variable naming for the transient `recursiveReadDir`.
14 lines
376 B
TypeScript
14 lines
376 B
TypeScript
import * as fs from "fs";
|
|
import recursiveReaddir = require("recursive-readdir");
|
|
|
|
recursiveReaddir("some/path", (err, files) => {});
|
|
recursiveReaddir("some/path", ["foo.cs", "*.html"], (err, files) => {});
|
|
|
|
function apple(a: string, b: fs.Stats): boolean {
|
|
return true;
|
|
}
|
|
|
|
async function banana(): Promise<string[]> {
|
|
return recursiveReaddir("some/path", [apple]);
|
|
}
|