From 23c297b70d761818d939bedcd1e92c50e7155bbc Mon Sep 17 00:00:00 2001 From: segayuu Date: Tue, 5 Sep 2017 11:44:24 +0900 Subject: [PATCH] readdir typed. --- types/hexo-fs/index.d.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/types/hexo-fs/index.d.ts b/types/hexo-fs/index.d.ts index 8a0e96ebaa..5e8a595c66 100644 --- a/types/hexo-fs/index.d.ts +++ b/types/hexo-fs/index.d.ts @@ -301,10 +301,9 @@ export function read( export { readSync }; // readdir -export function readdir( - path: PathLike, - options?: { encoding: BufferEncoding; } | 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'base64' | 'latin1' | 'binary' | 'hex' -): Promise; // promisify +export function readdir(path: PathLike, options?: { encoding: BufferEncoding | null } | BufferEncoding | null): Promise; // promisify +export function readdir(path: PathLike, options: "buffer" | { encoding: "buffer" }): Promise; // promisify +export function readdir(path: PathLike, options?: { encoding?: string | null } | string | null): Promise>; // promisify export { readdirSync }; // readFile