Skip to content

Commit

Permalink
Merge pull request #4 from retejs/add-docs
Browse files Browse the repository at this point in the history
docs: throws Cancelled
  • Loading branch information
Ni55aN authored Jul 15, 2023
2 parents a63d146 + 5960353 commit 06c5665
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/dataflow-engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class DataflowEngine<Schemes extends DataflowEngineScheme> extends Scope<
/**
* Fetches input data for the node by fetching data for all its predecessors recursively.
* @param nodeId Node id to fetch input data for
* @throws {Cancelled} when `reset` is called while fetching data
* @throws `Cancelled when `reset` is called while fetching data
*/
public async fetchInputs(nodeId: NodeId) {
return this.getDataflow().fetchInputs(nodeId)
Expand All @@ -116,7 +116,7 @@ export class DataflowEngine<Schemes extends DataflowEngineScheme> extends Scope<
/**
* Fetches output data of the node
* @param nodeId Node id to fetch data from
* @throws {Cancelled} when `reset` is called while fetching data
* @throws `Cancelled` when `reset` is called while fetching data
*/
public async fetch(nodeId: NodeId) {
return this.getDataflow().fetch(nodeId)
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './control-flow-engine'
export * from './dataflow'
export * from './dataflow-engine'
export * from './utils/cancellable'
export { Cancelled } from './utils/cancellable'
4 changes: 3 additions & 1 deletion src/utils/cancellable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

/**
* Cancelled exception. Thrown when `reset` is called while fetching data.
*/
export class Cancelled extends Error {
constructor() {
super('cancelled')
Expand Down

0 comments on commit 06c5665

Please sign in to comment.