type Promisable = T | Promise; export type Callback = ( directory: string, files: string[] ) => Promisable; export default function ( directory: string, callback: Callback ): Promise;