@types/toposort
TypeScript definitions for toposort
Last updated 7 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/toposort 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/toposort

Summary

This package contains type definitions for toposort (https://github.com/marcelklehr/toposort).

Details

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

index.d.ts

/**
 * @param edges An array of directed edges describing a graph. An edge looks
 *              like this: `[node1, node2]` (vertices needn't be strings but can
 *              be of any type).
 * @returns a list of vertices, sorted from "start" to "end"
 * @throws if there are any cycles in the graph
 */
declare function toposort<T = string>(edges: ReadonlyArray<[T, T | undefined]>): T[];
declare namespace toposort {
    /**
     * This is a convenience method that allows you to define nodes that may or
     * may not be connected to any other nodes. The ordering of unconnected
     * nodes is not defined.
     * @param nodes An array of nodes
     * @param edges An array of directed edges. You don't need to mention all
     *              `nodes` here.
     * @returns a list of vertices, sorted from "start" to "end"
     * @throws if there are any cycles in the graph
     */
    function array<T = string>(
        nodes: readonly T[],
        edges: ReadonlyArray<[T, T | undefined]>,
    ): T[];
}
export = toposort;

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: none

Credits

These definitions were written by Daniel Byrne, Prokop Simek, and Emily Marigold Klassen.

Current Tags

  • 2.0.3                                ...           latest (7 years ago)
  • 2.0.2                                ...           ts2.0 (7 years ago)
  • 2.0.2                                ...           ts2.1 (7 years ago)
  • 2.0.2                                ...           ts2.2 (7 years ago)
  • 2.0.3                                ...           ts2.3 (7 years ago)
  • 2.0.3                                ...           ts2.4 (7 years ago)
  • 2.0.3                                ...           ts2.5 (7 years ago)
  • 2.0.3                                ...           ts2.6 (7 years ago)
  • 2.0.3                                ...           ts2.7 (7 years ago)
  • 2.0.3                                ...           ts2.8 (7 years ago)
  • 2.0.3                                ...           ts2.9 (7 years ago)
  • 2.0.3                                ...           ts3.0 (7 years ago)
  • 2.0.3                                ...           ts3.1 (7 years ago)
  • 2.0.3                                ...           ts3.2 (7 years ago)
  • 2.0.3                                ...           ts3.3 (7 years ago)
  • 2.0.3                                ...           ts3.4 (7 years ago)
  • 2.0.3                                ...           ts3.5 (7 years ago)
  • 2.0.3                                ...           ts3.6 (7 years ago)
  • 2.0.3                                ...           ts3.7 (7 years ago)
  • 2.0.3                                ...           ts3.8 (7 years ago)
  • 2.0.3                                ...           ts3.9 (7 years ago)
  • 2.0.3                                ...           ts4.0 (7 years ago)
  • 2.0.3                                ...           ts4.1 (7 years ago)
  • 2.0.3                                ...           ts4.2 (7 years ago)
  • 2.0.3                                ...           ts4.3 (7 years ago)
  • 2.0.3                                ...           ts4.4 (7 years ago)
  • 2.0.3                                ...           ts4.5 (7 years ago)
  • 2.0.3                                ...           ts4.6 (7 years ago)
  • 2.0.3                                ...           ts4.7 (7 years ago)
  • 2.0.3                                ...           ts4.8 (7 years ago)
  • 2.0.3                                ...           ts4.9 (7 years ago)

4 Versions

  • 2.0.3                                ...           7 years ago
  • 2.0.2                                ...           7 years ago
  • 2.0.1                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |