Skip to content

FiberStatus

13 exports Added in v2.0.0 Source

Constructors

done

Added in v2.0.0 Source

Signature

declare const done: FiberStatus;

running

Added in v2.0.0 Source

Signature

declare const running: (runtimeFlags: RuntimeFlags.RuntimeFlags) => FiberStatus;

suspended

Added in v2.0.0 Source

Signature

declare const suspended: (
  runtimeFlags: RuntimeFlags.RuntimeFlags,
  blockingOn: FiberId.FiberId,
) => FiberStatus;

Models

Done interface

Added in v2.0.0 Source

Signature

interface Done extends Equal {
  readonly _tag: "Done";
  readonly [FiberStatusTypeId]: typeof FiberStatusTypeId;
}

FiberStatus type

Added in v2.0.0 Source

Signature

type FiberStatus = Done | Running | Suspended;

Running interface

Added in v2.0.0 Source

Signature

interface Running extends Equal {
  readonly _tag: "Running";
  readonly [FiberStatusTypeId]: typeof FiberStatusTypeId;
  readonly runtimeFlags: RuntimeFlags;
}

Suspended interface

Added in v2.0.0 Source

Signature

interface Suspended extends Equal {
  readonly _tag: "Suspended";
  readonly [FiberStatusTypeId]: typeof FiberStatusTypeId;
  readonly blockingOn: FiberId;
  readonly runtimeFlags: RuntimeFlags;
}

Refinements

isDone

Added in v2.0.0 Source

Returns true if the specified FiberStatus is Done, false otherwise.

Signature

declare const isDone: (self: FiberStatus) => self is Done;

Returns true if the specified value is a FiberStatus, false otherwise.

Signature

declare const isFiberStatus: (u: unknown) => u is FiberStatus;

isRunning

Added in v2.0.0 Source

Returns true if the specified FiberStatus is Running, false otherwise.

Signature

declare const isRunning: (self: FiberStatus) => self is Running;

isSuspended

Added in v2.0.0 Source

Returns true if the specified FiberStatus is Suspended, false otherwise.

Signature

declare const isSuspended: (self: FiberStatus) => self is Suspended;

Symbols

Signature

declare const FiberStatusTypeId: unique symbol;

FiberStatusTypeId type

Added in v2.0.0 Source

Signature

type FiberStatusTypeId = typeof FiberStatusTypeId;