{"_id":"@types/topo","_rev":"2931793","name":"@types/topo","description":"TypeScript definitions for topo","dist-tags":{"latest":"3.0.1","ts2.3":"3.0.0","ts2.4":"3.0.0","ts2.5":"3.0.0","ts2.6":"3.0.0","ts2.7":"3.0.0","ts2.8":"3.0.0","ts2.9":"3.0.0","ts3.0":"3.0.0","ts3.1":"3.0.0","ts3.2":"3.0.0","ts3.3":"3.0.0","ts3.4":"3.0.0","ts3.5":"3.0.0","ts3.6":"3.0.1","ts3.7":"3.0.1","ts3.8":"3.0.1","ts3.9":"3.0.1","ts4.0":"3.0.1","ts4.1":"3.0.1","ts4.2":"3.0.1","ts4.3":"3.0.1","ts4.4":"3.0.1","ts4.5":"3.0.1","ts4.6":"3.0.1","ts4.7":"3.0.1","ts4.8":"3.0.1","ts4.9":"3.0.1","ts5.0":"3.0.1","ts5.1":"3.0.1"},"maintainers":[{"name":"types","email":""}],"time":{"modified":"2023-03-14T06:28:52.000Z","created":"2018-12-25T05:38:33.094Z","3.0.1":"2021-07-02T19:47:20.638Z","3.0.0":"2018-12-25T05:38:33.094Z"},"users":{},"repository":{"type":"git","url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","directory":"types/topo"},"versions":{"3.0.1":{"name":"@types/topo","version":"3.0.1","description":"TypeScript definitions for topo","homepage":"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/topo","license":"MIT","contributors":[{"name":"BendingBender","url":"https://github.com/BendingBender","githubUsername":"BendingBender"}],"main":"","types":"index.d.ts","repository":{"type":"git","url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","directory":"types/topo"},"scripts":{},"dependencies":{},"typesPublisherContentHash":"1b4f685280d914b68f1adc61f2847ef89530aca32f0347c6025f28ccdcf48f24","typeScriptVersion":"3.6","_id":"@types/topo@3.0.1","dist":{"shasum":"a0898bfc12638d47a11e766aaef6cb4ed9e4ad1d","size":2271,"noattachment":false,"key":"/@types/topo/-/@types/topo-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@types/topo/download/@types/topo-3.0.1.tgz"},"_npmUser":{"name":"types","email":"ts-npm-types@microsoft.com"},"directories":{},"maintainers":[{"name":"types","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/topo_3.0.1_1625255240514_0.6723027665134818"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T08:59:23.533Z","publish_time":1625255240638,"_cnpm_publish_time":1625255240638},"3.0.0":{"name":"@types/topo","version":"3.0.0","description":"TypeScript definitions for topo","license":"MIT","contributors":[{"name":"BendingBender","url":"https://github.com/BendingBender","githubUsername":"BendingBender"}],"main":"","types":"index","repository":{"type":"git","url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git"},"scripts":{},"dependencies":{},"typesPublisherContentHash":"42c6a2c5ac31f8c4d1eee714fb8c1ddc150a4da20bc5e3f4cf75cd26188fb597","typeScriptVersion":"2.3","_id":"@types/topo@3.0.0","dist":{"shasum":"39c71412d33a5758019a974eca47d986b3586115","size":2183,"noattachment":false,"key":"/@types/topo/-/@types/topo-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@types/topo/download/@types/topo-3.0.0.tgz"},"maintainers":[{"name":"types","email":""}],"_npmUser":{"name":"types","email":"ts-npm-types@microsoft.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/topo_3.0.0_1545716312965_0.09434971245329282"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T08:59:23.427Z","publish_time":1545716313094,"_cnpm_publish_time":1545716313094}},"readme":"# Installation\r\n> `npm install --save @types/topo`\r\n\r\n# Summary\r\nThis package contains type definitions for topo (https://github.com/hapijs/topo#readme).\r\n\r\n# Details\r\nFiles were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/topo.\r\n## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/topo/index.d.ts)\r\n````ts\r\n// Type definitions for topo 3.0\n// Project: https://github.com/hapijs/topo#readme\n// Definitions by: BendingBender <https://github.com/BendingBender>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n// TypeScript Version: 2.3\n\nexport = Topo;\n\n/**\n * The Topo object is the container for topologically sorting a list of nodes with non-circular interdependencies.\n */\ndeclare class Topo<TNode = any, TGroup = string> {\n    /**\n     * An array of the topologically sorted nodes. This list is renewed upon each call to `topo.add()`.\n     */\n    nodes: TNode[];\n\n    /**\n     * Specifies an additional node or list of nodes to be topologically sorted.\n     *\n     * @param nodes a mixed value or array of mixed values to be added as nodes to the topologically sorted list.\n     * @param options optional sorting information about the `nodes`:\n     * - `group` - a string naming the group to which `nodes` should be assigned. The group name `'?'` is reserved.\n     * - `before` - a string or array of strings specifying the groups that `nodes` must precede in the topological sort.\n     * - `after` - a string or array of strings specifying the groups that `nodes` must succeed in the topological sort.\n     * - `sort` - a numerical value used to sort items when performing a `topo.merge()`.\n     * @returns an array of the topologically sorted nodes.\n     */\n    add(\n        nodes: TNode | TNode[],\n        options?: {\n            group?: TGroup | undefined;\n            before?: TGroup | TGroup[] | undefined;\n            after?: TGroup | TGroup[] | undefined;\n            sort?: number | undefined;\n        }\n    ): TNode[];\n\n    /**\n     * Merges another `Topo` object into the current object.\n     * If the order in which items have been added to each list matters, use the `sort` option in `topo.add()`\n     * with an incrementing value providing an absolute sort order among all items added to either object.\n     *\n     * @param others the other object or array of objects to be merged into the current one. `null` values are ignored.\n     * @returns an array of the topologically sorted nodes. Will throw if a dependency error is found as a result of the combined items.\n     */\n    merge(others: Topo<TNode, TGroup> | Array<Topo<TNode, TGroup>>): TNode[];\n}\n\r\n````\r\n\r\n### Additional Details\r\n * Last updated: Fri, 02 Jul 2021 19:37:13 GMT\r\n * Dependencies: none\r\n * Global values: none\r\n\r\n# Credits\r\nThese definitions were written by [BendingBender](https://github.com/BendingBender).\r\n","_attachments":{},"homepage":"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/topo","license":"MIT"}