@types/klaw
TypeScript definitions for klaw
Last updated 2 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm 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](): AsyncIterableIterator<Item>;
        }
    }

    export = K;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 20:08:00 GMT
  • Dependencies: @types/node

Credits

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

Current Tags

  • 3.0.6                                ...           latest (2 years ago)
  • 3.0.0                                ...           ts2.0 (7 years ago)
  • 3.0.0                                ...           ts2.1 (7 years ago)
  • 3.0.0                                ...           ts2.2 (7 years ago)
  • 3.0.0                                ...           ts2.3 (7 years ago)
  • 3.0.0                                ...           ts2.4 (7 years ago)
  • 3.0.0                                ...           ts2.5 (7 years ago)
  • 3.0.0                                ...           ts2.6 (7 years ago)
  • 3.0.0                                ...           ts2.7 (7 years ago)
  • 3.0.1                                ...           ts2.8 (6 years ago)
  • 3.0.1                                ...           ts2.9 (6 years ago)
  • 3.0.1                                ...           ts3.0 (6 years ago)
  • 3.0.1                                ...           ts3.1 (6 years ago)
  • 3.0.1                                ...           ts3.2 (6 years ago)
  • 3.0.1                                ...           ts3.3 (6 years ago)
  • 3.0.1                                ...           ts3.4 (6 years ago)
  • 3.0.1                                ...           ts3.5 (6 years ago)
  • 3.0.2                                ...           ts3.6 (5 years ago)
  • 3.0.3                                ...           ts3.7 (4 years ago)
  • 3.0.3                                ...           ts3.8 (4 years ago)
  • 3.0.3                                ...           ts3.9 (4 years ago)
  • 3.0.3                                ...           ts4.0 (4 years ago)
  • 3.0.3                                ...           ts4.1 (4 years ago)
  • 3.0.3                                ...           ts4.2 (4 years ago)
  • 3.0.3                                ...           ts4.3 (4 years ago)
  • 3.0.3                                ...           ts4.4 (4 years ago)
  • 3.0.6                                ...           ts4.5 (2 years ago)
  • 3.0.6                                ...           ts4.6 (2 years ago)
  • 3.0.6                                ...           ts4.7 (2 years ago)
  • 3.0.6                                ...           ts4.8 (2 years ago)
  • 3.0.6                                ...           ts4.9 (2 years ago)
  • 3.0.6                                ...           ts5.0 (2 years ago)
  • 3.0.6                                ...           ts5.1 (2 years ago)
  • 3.0.6                                ...           ts5.2 (2 years ago)
  • 3.0.6                                ...           ts5.3 (2 years ago)
  • 3.0.6                                ...           ts5.4 (2 years ago)
  • 3.0.6                                ...           ts5.5 (2 years ago)
  • 3.0.6                                ...           ts5.6 (2 years ago)
  • 3.0.6                                ...           ts5.7 (2 years ago)
  • 3.0.6                                ...           ts5.8 (2 years ago)
  • 3.0.6                                ...           ts5.9 (2 years ago)

18 Versions

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

Copyright 2013 - present © cnpmjs.org | Home |