mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
BFS returns void if search not successful
return true if search has found the node return false if search is aborted before finding anything returns void/undefined if search should continue therefore return type is a union type of `=> boolean | void`
This commit is contained in:
parent
1151563af9
commit
c7e213857e
6
types/cytoscape/index.d.ts
vendored
6
types/cytoscape/index.d.ts
vendored
@ -2819,13 +2819,13 @@ declare namespace cytoscape {
|
||||
|
||||
/**
|
||||
* The handler returns true when it finds the desired node, and it returns false to cancel the search.
|
||||
* i - The index indicating this node is the ith visited node.
|
||||
* depth - How many edge hops away this node is from the root nodes.
|
||||
* v - The current node.
|
||||
* e - The edge connecting the previous node to the current node.
|
||||
* u - The previous node.
|
||||
* i - The index indicating this node is the ith visited node.
|
||||
* depth - How many edge hops away this node is from the root nodes.
|
||||
*/
|
||||
type SearchVisitFunction = (i: number, depth: number, v: NodeCollection, e: EdgeCollection, u: NodeCollection) => boolean;
|
||||
type SearchVisitFunction = (v: NodeCollection, e: EdgeCollection, u: NodeCollection, i: number, depth: number) => boolean | void;
|
||||
interface SearchFirstOptions {
|
||||
/**
|
||||
* The root nodes (selector or collection) to start the search from.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user