@types/klaw
TypeScript definitions for klaw
Last updated 2 months ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ npm install @types/klaw 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/klaw

Summary

This package contains type definitions for klaw (https://github.com/jprichardson/node-klaw).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/klaw.

index.d.ts

/// <reference types="node" />

declare module "klaw" {
    import * as fs from "fs";
    import { Readable, ReadableOptions } from "stream";

    function K(root: string, options?: K.Options): K.Walker;

    namespace K {
        interface Item {
            path: string;
            stats: fs.Stats;
        }

        type QueueMethod = "shift" | "pop";

        interface Options extends ReadableOptions {
            queueMethod?: QueueMethod | undefined;
            pathSorter?: ((pathA: string, pathB: string) => number) | undefined;
            fs?: any; // fs or mock-fs
            filter?: ((path: string) => boolean) | undefined;
            depthLimit?: number | undefined;
            preserveSymlinks?: boolean | undefined;
        }

        type Event = "close" | "data" | "end" | "error" | "pause" | "readable" | "resume";

        interface Walker extends Readable, AsyncIterable<Item> {
            on(event: Event, listener: Function): this;
            on(event: "close", listener: () => void): this;
            on(event: "data", listener: (item: Item) => void): this;
            on(event: "end", listener: () => void): this;
            on(event: "readable", listener: () => void): this;
            on(event: "error", listener: (err: Error) => void): this;
            read(): Item;
            [Symbol.asyncIterator](): AsyncIteratorObject<Item, any, any>;
        }
    }

    export = K;
}

Additional Details

  • Last updated: Mon, 28 Sep 2026 23:34:57 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Matthew McEachen, and Pascal Sthamer.

Current Tags

  • 3.0.8                                ...           latest (2 months ago)
  • 3.0.0                                ...           ts2.0 (8 years ago)
  • 3.0.0                                ...           ts2.1 (8 years ago)
  • 3.0.0                                ...           ts2.2 (8 years ago)
  • 3.0.0                                ...           ts2.3 (8 years ago)
  • 3.0.0                                ...           ts2.4 (8 years ago)
  • 3.0.0                                ...           ts2.5 (8 years ago)
  • 3.0.0                                ...           ts2.6 (8 years ago)
  • 3.0.0                                ...           ts2.7 (8 years ago)
  • 3.0.1                                ...           ts2.8 (7 years ago)
  • 3.0.1                                ...           ts2.9 (7 years ago)
  • 3.0.1                                ...           ts3.0 (7 years ago)
  • 3.0.1                                ...           ts3.1 (7 years ago)
  • 3.0.1                                ...           ts3.2 (7 years ago)
  • 3.0.1                                ...           ts3.3 (7 years ago)
  • 3.0.1                                ...           ts3.4 (7 years ago)
  • 3.0.1                                ...           ts3.5 (7 years ago)
  • 3.0.2                                ...           ts3.6 (5 years ago)
  • 3.0.3                                ...           ts3.7 (5 years ago)
  • 3.0.3                                ...           ts3.8 (5 years ago)
  • 3.0.3                                ...           ts3.9 (5 years ago)
  • 3.0.3                                ...           ts4.0 (5 years ago)
  • 3.0.3                                ...           ts4.1 (5 years ago)
  • 3.0.3                                ...           ts4.2 (5 years ago)
  • 3.0.3                                ...           ts4.3 (5 years ago)
  • 3.0.3                                ...           ts4.4 (5 years ago)
  • 3.0.6                                ...           ts4.5 (3 years ago)
  • 3.0.6                                ...           ts4.6 (3 years ago)
  • 3.0.6                                ...           ts4.7 (3 years ago)
  • 3.0.6                                ...           ts4.8 (3 years ago)
  • 3.0.6                                ...           ts4.9 (3 years ago)
  • 3.0.6                                ...           ts5.0 (3 years ago)
  • 3.0.7                                ...           ts5.1 (a year ago)
  • 3.0.7                                ...           ts5.2 (a year ago)
  • 3.0.7                                ...           ts5.3 (a year ago)
  • 3.0.7                                ...           ts5.4 (a year ago)
  • 3.0.7                                ...           ts5.5 (a year ago)
  • 3.0.8                                ...           ts5.6 (2 months ago)
  • 3.0.8                                ...           ts5.7 (2 months ago)
  • 3.0.8                                ...           ts5.8 (2 months ago)
  • 3.0.8                                ...           ts5.9 (2 months ago)
  • 3.0.8                                ...           ts6.0 (2 months ago)
  • 3.0.8                                ...           ts7.0 (2 months ago)
  • 3.0.8                                ...           ts7.1 (2 months ago)

20 Versions

  • 3.0.8                                ...           2 months ago
  • 3.0.7                                ...           a year ago
  • 1.3.9                                ...           3 years ago
  • 3.0.6                                ...           3 years ago
  • 1.3.8                                ...           3 years ago
  • 3.0.5                                ...           3 years ago
  • 1.3.7                                ...           3 years ago
  • 3.0.4                                ...           3 years ago
  • 3.0.3                                ...           5 years ago
  • 1.3.6                                ...           5 years ago
  • 3.0.2                                ...           5 years ago
  • 3.0.1                                ...           7 years ago
  • 3.0.0                                ...           8 years ago
  • 1.3.5                                ...           8 years ago
  • 1.3.4                                ...           9 years ago
  • 2.1.1                                ...           9 years ago
  • 2.1.0                                ...           9 years ago
  • 1.3.3                                ...           9 years ago
  • 1.3.2                                ...           10 years ago
  • 1.3.1                                ...           10 years ago
Maintainers (1)
Downloads
Total 48
Today 0
This Week 0
This Month 41
Last Day 0
Last Week 22
Last Month 7
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE