mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 19:59:02 +08:00
klaw/v1: Minor cleanup
This commit is contained in:
8
types/klaw/v1/index.d.ts
vendored
8
types/klaw/v1/index.d.ts
vendored
@@ -5,7 +5,7 @@
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import * as fs from "fs";
|
||||
import { Stats } from "fs";
|
||||
import { Readable, ReadableOptions } from 'stream';
|
||||
|
||||
declare function K(root: string, options?: K.Options): K.Walker;
|
||||
@@ -13,16 +13,16 @@ declare function K(root: string, options?: K.Options): K.Walker;
|
||||
declare namespace K {
|
||||
interface Item {
|
||||
path: string;
|
||||
stats: fs.Stats;
|
||||
stats: Stats;
|
||||
}
|
||||
|
||||
type QueueMethod = "shift" | "pop";
|
||||
|
||||
interface Options extends ReadableOptions {
|
||||
queueMethod?: QueueMethod;
|
||||
pathSorter?: (pathA: string, pathB: string) => number;
|
||||
pathSorter?(pathA: string, pathB: string): number;
|
||||
fs?: any; // fs or mock-fs
|
||||
filter?: (path: string) => boolean;
|
||||
filter?(path: string): boolean;
|
||||
}
|
||||
|
||||
type Event = "close" | "data" | "end" | "readable" | "error";
|
||||
|
||||
Reference in New Issue
Block a user