Skip to content

Commit

Permalink
refactor(rstream): switch to non-const enums
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Apr 4, 2020
1 parent 7a8a3b1 commit 1f6221d
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions packages/rstream/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
import { NULL_LOGGER } from "@thi.ng/api";
import { Stream } from "./stream";
import { Subscription } from "./subscription";
import type {
Fn,
Fn0,
IDeref,
IID,
ILogger
} from "@thi.ng/api";
import type { Fn, Fn0, IDeref, IID, ILogger } from "@thi.ng/api";
import type { Transducer } from "@thi.ng/transducers";

export const enum State {
export enum State {
IDLE,
ACTIVE,
DONE,
ERROR,
DISABLED // TODO currently unused
DISABLED, // TODO currently unused
}

/**
* Closing behaviors.
*/
export const enum CloseMode {
export enum CloseMode {
/**
* Never close, even if no more inputs/outputs.
*/
Expand All @@ -33,7 +27,7 @@ export const enum CloseMode {
/**
* Close when last input/output is done / removed.
*/
LAST
LAST,
}

/**
Expand Down

0 comments on commit 1f6221d

Please sign in to comment.