api/globals
Globals
qio
Index
Enumerations
Classes
- ArrayC
- Await
- Chunk
- Concat
- Counter
- DefaultRuntime
- Empty
- FMap
- Fiber
- FiberCancelled
- FiberContext
- FiberFailure
- FiberRuntime
- FiberSuccess
- Flag
- IDGenerator
- InvalidInstruction
- Managed
- NoSuchElement
- PureMutableList
- QIO
- QIOServer
- QIOServerBuilder
- QStream
- Queue
- Ref
- RemoveNode
- Reservation
- Snapshot
- Stack
- StupidCancel
- TestRuntime
- Value
- YieldCount
- YieldDuration
- YieldStrategy
Interfaces
- IAccess
- IAsapM
- IAsync
- ICall
- ICapture
- ICatch
- IChain
- IConsoleEnv
- IConstant
- ICwdEnc
- IDurationM
- IExitEnv
- IFSEnv
- IFork
- IHttpEnv
- IHttpRequestConfig
- IMap
- IMath
- INever
- IProcessEnv
- IProvide
- IQIOServerOptions
- IRTime
- IReadLineEnv
- IReject
- IRuntime
- ISpec
- ITextTerminal
- ITextTerminalEnv
- ITextTerminalTest
- ITry
- ITryM
Type aliases
Variables
- AWAIT_ID
- FIBER_ID
- FS
- FTrue
- MAX
- MAX_NUMBER
- MIN_NUMBER
- PATH_NPM_IGNORE
- PATH_PACKAGES
- QUEUE_ID
- RUN_NATIVE
- arr
- canContinue
- closeRL
- count
- expect
- gameLoop
- greet
- inputName
- inputNumber
- managedRL
- openRL
- program
- qCwd
- qioIteration
- qioRuntime
- randomNumber
- read
- readFile
- runtime
- should
- suite
- write
- writeFile
Functions
- D
- FTrueCb
- PrintLn
- Resource
- RunSuite
- T
- U
- V
- bluebirdMapper
- checkWithRandom
- consume
- createArray
- createChunkCapacity
- createChunks
- createFSWithEnv
- createMockChunks
- defaultRuntime
- fib
- fibBird
- fibFluture
- fibMatechs
- fibQIO
- flutureMapper
- getStrLn
- getStrLn0
- inc
- itShouldAcquireOnce
- itShouldFollowSpec
- itShouldReleaseAfterUsage
- itShouldReleaseOnce
- log
- matechsMapper
- memoize
- putStrLn
- putStrLn0
- qExit
- qSymLink
- qSymLinkForced
- qioMapper
- qioRecursion
- randomInt
- range
- request
- split
- testRuntime
- testTTY
Object literals
Type aliases
CB
Ƭ CB<T>: (T: T) => void
Defined in packages/core/lib/internals/CB.ts:4
A callback function that takes in one param and returns a void
Type parameters:
Name |
---|
T |
CBExit
Ƭ CBExit<A, E>: (O: Exit<A, E>) => void
Defined in packages/core/lib/internals/CBExit.ts:3
Type parameters:
Name |
---|
A |
E |
Exit
Ƭ Exit<A, E>: FiberCancelled | FiberFailure<E> | FiberSuccess<A>
Defined in packages/core/lib/main/Exit.ts:22
Type parameters:
Name |
---|
A |
E |
FSWithEnv
Ƭ FSWithEnv<O>: {}
Defined in packages/fs/lib/FS.ts:71
Type parameters:
Name | Type |
---|---|
O | ISpec |
FiberConfig
Ƭ FiberConfig: IAsapM | IDurationM
Defined in packages/core/lib/internals/FiberConfig.ts:21
QIOErrno
Ƭ QIOErrno<A>: QIO<A, ErrnoException>
Defined in packages/fs/lib/FS.ts:6
Type parameters:
Name |
---|
A |
Variables
AWAIT_ID
• Const
AWAIT_ID: IDGenerator = new IDGenerator()
Defined in packages/core/lib/main/Await.ts:14
FIBER_ID
• Const
FIBER_ID: IDGenerator = new IDGenerator()
Defined in packages/core/lib/internals/Fiber.ts:51
Fiber Id is used while debugging
FS
• Const
FS: FSWithEnv<{ close: (fd: number) => QIOErrno<void> ; copyFile: (src: fs.PathLike, dest: fs.PathLike) => QIOErrno<void> ; open: (path: fs.PathLike, mode: string, flag?: undefined | number) => QIOErrno<number> ; readFile: (path: fs.PathLike | number, options?: undefined | { encoding?: undefined | null ; flag?: undefined | string }) => QIOErrno<string | Buffer> ; readdir: (path: string, options?: { encoding: BufferEncoding | null ; withFileTypes?: undefined | false } | BufferEncoding) => QIOErrno<string[]> ; symlink: (target: fs.PathLike, path: fs.PathLike) => QIOErrno<void> ; unlink: (path: fs.PathLike) => QIOErrno<void> ; writeFile: (path: fs.PathLike | number, data: string | NodeJS.ArrayBufferView, options: fs.WriteFileOptions) => QIOErrno<void> }> = createFSWithEnv(FSEnv)
Defined in packages/fs/lib/FS.ts:96
FTrue
• Const
FTrue: QIO<boolean, never, unknown> = QIO.resolve(true)
Defined in packages/stream/lib/QStream.ts:7
MAX
• Const
MAX: 1000 = 1000
Defined in packages/benchmarks/DS/Stack.ts:6
Defined in packages/benchmarks/IO/NestedChain.ts:8
Defined in packages/benchmarks/IO/NestedMap.ts:13
MAX_NUMBER
• Const
MAX_NUMBER: 6 = 6
Defined in packages/example/guess-the-number/src/Program.ts:5
MIN_NUMBER
• Const
MIN_NUMBER: 1 = 1
Defined in packages/example/guess-the-number/src/Program.ts:6
PATH_NPM_IGNORE
• Const
PATH_NPM_IGNORE: "../../.npmignore" = "../../.npmignore"
Defined in packages/scripts/lib/Symlink.ts:15
PATH_PACKAGES
• Const
PATH_PACKAGES: string = p.resolve(process.cwd(), 'packages')
Defined in packages/scripts/lib/Symlink.ts:14
QUEUE_ID
• Const
QUEUE_ID: IDGenerator = new IDGenerator()
Defined in packages/core/lib/main/Queue.ts:9
RUN_NATIVE
• Const
RUN_NATIVE: false = false
Defined in packages/benchmarks/internals/RunSuite.ts:15
Native runs native benchmarks.
arr
• Const
arr: number[] = new Array<number>()
Defined in packages/benchmarks/Stream/Stream.ts:14
canContinue
• Const
canContinue: QIO<boolean, never, ITextTerminalEnv> = getStrLn( 'Press ⏎ to continue (or will exit in 3sec): ') .const(true) .race(putStrLn('\nGood bye!').delay(3000).const(false))
Defined in packages/example/guess-the-number/src/Program.ts:50
Checks if the use wants to continue with the game.
closeRL
• Const
closeRL: (...t: T) => QIO<A, E> = QIO.encase((RL: R.Interface) => RL.close())
Defined in packages/console/lib/Console.ts:50
count
• Const
count: 1000000 = 1000000
Defined in packages/benchmarks/IO/Fibonacci.ts:71
Defined in packages/benchmarks/Stream/Stream.ts:13
expect
• Const
expect: ExpectStatic = chai.expect
Defined in packages/chai/Chai.ts:7
gameLoop
• Const
gameLoop: QIO<boolean, never, ITextTerminalEnv & IMath> = inputNumber .mapM(checkWithRandom) .forEachWhile(() => canContinue)
Defined in packages/example/guess-the-number/src/Program.ts:74
Starts of the game in a loop until the user decides to exit.
greet
• Const
greet: QIO<void, never, ITextTerminalEnv> = putStrLn('Greetings!').and(inputName)
Defined in packages/example/guess-the-number/src/Program.ts:69
Takes in the the player's name and greets them with a message.
inputName
• Const
inputName: QIO<void, never, ITextTerminalEnv> = getStrLn('Enter your name: ').chain((name) => putStrLn(`Welcome to the world of functional programming, ${name}!`))
Defined in packages/example/guess-the-number/src/Program.ts:43
Takes the player's name.
inputNumber
• Const
inputNumber: QStream<number, never, ITextTerminalEnv> = QStream.produce( getStrLn(`Enter a number between ${MIN_NUMBER} & ${MAX_NUMBER}: `)) .map((_) => parseInt(_, 10)) .filter( (input) => Number.isFinite(input) && input >= MIN_NUMBER && input <= MAX_NUMBER )
Defined in packages/example/guess-the-number/src/Program.ts:31
Keeps taking a numeric input from the player.
managedRL
• Const
managedRL: Managed<Interface, never, IReadLineEnv & IProcessEnv> = Managed.make(openRL, closeRL)
Defined in packages/console/lib/Console.ts:51
openRL
• Const
openRL: QIO<Interface, never, IReadLineEnv & IProcessEnv> = QIO.env<IReadLineEnv>().zipWithM( QIO.env<IProcessEnv>(), QIO.encase((R1, R2) => R1.readLine.createInterface({ input: R2.process.stdin, output: R2.process.stdout, }) ))
Defined in packages/console/lib/Console.ts:41
program
• Const
program: QIO<void[], ErrnoException, { fs: {} } & ICwdEnc & { fs: {} } & ITextTerminalEnv & { fs: {} }> = FS.readdir(PATH_PACKAGES).zipWithM(qCwd, (fileList, cwd) => QIO.par( fileList.map((F) => { const path = p.resolve(process.cwd(), 'packages', F, '.npmignore') return qSymLink(path) .and(putStrLn('OK', path)) .catch((err) => QIO.if( err.code === 'EEXIST', putStrLn('EXISTS', path) .and(qSymLinkForced(path)) .and(putStrLn('RETRY OK', path)), QIO.reject(err) ) ) }) ))
Defined in packages/example/guess-the-number/src/Program.ts:78
Defined in packages/scripts/lib/Symlink.ts:21
qCwd
• Const
qCwd: QIO<string, never, ICwdEnc> = QIO.access((_: ICwdEnc) => _.cwd())
Defined in packages/scripts/lib/Symlink.ts:19
qioIteration
• Const
qioIteration: (...t: T) => QIO<A, E> = QIO.encase((numbers: number[]) => { let sum = 0 for (let i = 0; i < numbers.length; i++) { sum += numbers[i] } return sum})
Defined in packages/benchmarks/Stream/Stream.ts:20
qioRuntime
• Const
qioRuntime: DefaultRuntime = defaultRuntime()
Defined in packages/benchmarks/internals/RunSuite.ts:10
randomNumber
• Const
randomNumber: QIO<number, never, IMath> = QIO.access((env: IMath) => env.math.random())
Defined in packages/example/guess-the-number/src/Program.ts:20
Generates a random number.
read
• Const
read: Object = QIO.encaseP(promises.read)
Defined in packages/core/lib/main/FS.ts:9
readFile
• Const
readFile: (...t: T) => QIO<A, Error> = QIO.encaseP(promises.readFile)
Defined in packages/core/lib/main/FS.ts:10
runtime
• Const
runtime: DefaultRuntime = defaultRuntime()
Defined in packages/example/guess-the-number/src/Run.ts:14
Defined in packages/prototype/FServer.ts:65
should
• Const
should: Should = chai.should()
Defined in packages/chai/Chai.ts:6
suite
• Const
suite: Suite = new Suite('QStream')
Defined in packages/benchmarks/DS/Stack.ts:7
Defined in packages/benchmarks/Stream/Stream.ts:11
write
• Const
write: (...t: T) => QIO<A, Error> = QIO.encaseP(promises.write)
Defined in packages/core/lib/main/FS.ts:11
writeFile
• Const
writeFile: (...t: T) => QIO<A, Error> = QIO.encaseP(promises.writeFile)
Defined in packages/core/lib/main/FS.ts:12
Functions
D
▸ Const
D(scope
: string, f
: unknown, ...t
: unknown[]): void
Defined in packages/core/lib/main/QIO.ts:19
Parameters:
Name | Type |
---|---|
scope | string |
f | unknown |
...t | unknown[] |
Returns: void
▸ Const
D(id
: number, scope
: string, ...t
: unknown[]): void
Defined in packages/core/lib/main/Await.ts:15
Parameters:
Name | Type |
---|---|
id | number |
scope | string |
...t | unknown[] |
Returns: void
▸ Const
D(scope
: string, f
: unknown, ...t
: unknown[]): void
Defined in packages/core/lib/main/Queue.ts:10
Parameters:
Name | Type |
---|---|
scope | string |
f | unknown |
...t | unknown[] |
Returns: void
▸ Const
D(scope
: string, f
: unknown, ...t
: unknown[]): void
Defined in packages/stream/lib/QStream.ts:10
Parameters:
Name | Type |
---|---|
scope | string |
f | unknown |
...t | unknown[] |
Returns: void
FTrueCb
▸ Const
FTrueCb(): QIO<boolean, never, unknown>
Defined in packages/stream/lib/QStream.ts:8
Returns: QIO<boolean, never, unknown>
PrintLn
▸ Const
PrintLn(...t
: unknown[]): void
Defined in packages/benchmarks/internals/PrintLn.ts:2
Parameters:
Name | Type |
---|---|
...t | unknown[] |
Returns: void
Resource
▸ Const
Resource(initialCount
: number): object
Defined in packages/core/tests/internals/Resource.ts:3
Parameters:
Name | Type | Default value |
---|---|---|
initialCount | number | 0 |
Returns: object
Name | Type |
---|---|
acquire | QIO<number, never, unknown> |
release | (...t: T) => QIO<A, E> |
count | |
isReleased |
RunSuite
▸ Const
RunSuite(name
: string, test
: { bluebird: () => PromiseLike<unknown> ; fluture: () => FutureInstance<unknown, unknown> ; matechs?: () => Effect<unknown, unknown, unknown> ; native?: () => void ; qio: () => QIO }): void
Defined in packages/benchmarks/internals/RunSuite.ts:17
Parameters:
Name | Type |
---|---|
name | string |
test | { bluebird: () => PromiseLike<unknown> ; fluture: () => FutureInstance<unknown, unknown> ; matechs?: () => Effect<unknown, unknown, unknown> ; native?: () => void ; qio: () => QIO } |
Returns: void
T
▸ Const
T(): boolean
Defined in packages/prelude/T.ts:1
Returns: boolean
U
▸ Const
U<A>(fn
: (CB: (err: ErrnoException | null, data: A) => void) => void): QIOErrno<A>
Defined in packages/fs/lib/FS.ts:11
Creates an uninterruptible effect from an async function
Type parameters:
Name |
---|
A |
Parameters:
Name | Type | |
---|---|---|
fn | (CB: (err: ErrnoException \ | null, data: A) => void) => void |
Returns: QIOErrno<A>
V
▸ Const
V<A, E>(fn
: (CB: (err: ErrnoException | null) => void) => void): QIOErrno<void>
Defined in packages/fs/lib/FS.ts:21
Creates an uninterruptible effect from an async function that returns void
Type parameters:
Name |
---|
A |
E |
Parameters:
Name | Type | |
---|---|---|
fn | (CB: (err: ErrnoException \ | null) => void) => void |
Returns: QIOErrno<void>
bluebirdMapper
▸ Const
bluebirdMapper(_
: bigint): Bluebird<bigint>
Defined in packages/benchmarks/IO/NestedChain.ts:11
Parameters:
Name | Type |
---|---|
_ | bigint |
Returns: Bluebird<bigint>
checkWithRandom
▸ Const
checkWithRandom(guess
: number): QIO<void, never, IMath & ITextTerminalEnv>
Defined in packages/example/guess-the-number/src/Program.ts:59
Takes an input integer and checks if it matches with a random number.
Parameters:
Name | Type |
---|---|
guess | number |
Returns: QIO<void, never, IMath & ITextTerminalEnv>
consume
▸ Const
consume<T>(T
: DoublyLinkedList<T>): T[]
Defined in packages/core/lib/main/Queue.ts:13
Type parameters:
Name |
---|
T |
Parameters:
Name | Type |
---|---|
T | DoublyLinkedList<T> |
Returns: T[]
createArray
▸ Const
createArray(n
: number): number[]
Defined in packages/core/tests/internals/CreateArray.ts:1
Parameters:
Name | Type |
---|---|
n | number |
Returns: number[]
createChunkCapacity
▸ Const
createChunkCapacity(count
: number, minSize
: number, maxSize
: number, distribution
: number): any[]
Defined in packages/core/lib/main/Chunk.ts:13
Parameters:
Name | Type |
---|---|
count | number |
minSize | number |
maxSize | number |
distribution | number |
Returns: any[]
createChunks
▸ Const
createChunks<A>(arr
: A[], chunkCount
: number): A[][]
Defined in packages/core/lib/main/Chunk.ts:27
Type parameters:
Name |
---|
A |
Parameters:
Name | Type |
---|---|
arr | A[] |
chunkCount | number |
Returns: A[][]
createFSWithEnv
▸ Const
createFSWithEnv<S>(S
: S): FSWithEnv<S>
Defined in packages/fs/lib/FS.ts:81
Type parameters:
Name | Type |
---|---|
S | ISpec |
Parameters:
Name | Type |
---|---|
S | S |
Returns: FSWithEnv<S>
createMockChunks
▸ Const
createMockChunks(n
: number, c
: number): Chunk<number>
Defined in packages/core/tests/internals/CreateMockChunks.ts:3
Parameters:
Name | Type |
---|---|
n | number |
c | number |
Returns: Chunk<number>
defaultRuntime
▸ Const
defaultRuntime(): DefaultRuntime
Defined in packages/core/lib/runtimes/DefaultRuntime.ts:28
Returns: DefaultRuntime
fib
▸ Const
fib(n
: bigint): bigint
Defined in packages/benchmarks/IO/Fibonacci.ts:13
Normal Fibonacci Implementation
Parameters:
Name | Type |
---|---|
n | bigint |
Returns: bigint
▸ Const
fib(N
: bigint): QIO<bigint, never, unknown>
Defined in packages/example/fibonacci/FibonacciIO.ts:5
Normal Fibonacci Implementation
Parameters:
Name | Type |
---|---|
N | bigint |
Returns: QIO<bigint, never, unknown>
fibBird
▸ Const
fibBird(n
: bigint): Promise<bigint>
Defined in packages/benchmarks/IO/Fibonacci.ts:50
Bluebird based implementation
Parameters:
Name | Type |
---|---|
n | bigint |
Returns: Promise<bigint>
fibFluture
▸ Const
fibFluture(n
: bigint): FutureInstance<never, bigint>
Defined in packages/benchmarks/IO/Fibonacci.ts:24
Fluture based implementation
Parameters:
Name | Type |
---|---|
n | bigint |
Returns: FutureInstance<never, bigint>
fibMatechs
▸ Const
fibMatechs(n
: bigint): Effect<T.NoEnv, never, bigint>
Defined in packages/benchmarks/IO/Fibonacci.ts:61
Matechs based implementation
Parameters:
Name | Type |
---|---|
n | bigint |
Returns: Effect<T.NoEnv, never, bigint>
fibQIO
▸ Const
fibQIO(n
: bigint): QIO<bigint>
Defined in packages/benchmarks/IO/Fibonacci.ts:39
QIO based implementation
Parameters:
Name | Type |
---|---|
n | bigint |
Returns: QIO<bigint>
flutureMapper
▸ Const
flutureMapper(_
: bigint): FutureInstance<never, bigint>
Defined in packages/benchmarks/IO/NestedChain.ts:10
Parameters:
Name | Type |
---|---|
_ | bigint |
Returns: FutureInstance<never, bigint>
getStrLn
▸ Const
getStrLn(question
: string): QIO<string, never, ITextTerminalEnv>
Defined in packages/console/lib/Console.ts:93
Takes input from the player through the stdin stream.
Parameters:
Name | Type |
---|---|
question | string |
Returns: QIO<string, never, ITextTerminalEnv>
getStrLn0
▸ Const
getStrLn0(question
: string): QIO<string, never, IReadLineEnv & IProcessEnv>
Defined in packages/console/lib/Console.ts:56
Parameters:
Name | Type | Default value |
---|---|---|
question | string | "" |
Returns: QIO<string, never, IReadLineEnv & IProcessEnv>
inc
▸ Const
inc(_
: bigint): bigint
Defined in packages/benchmarks/internals/Inc.ts:1
Parameters:
Name | Type |
---|---|
_ | bigint |
Returns: bigint
itShouldAcquireOnce
▸ Const
itShouldAcquireOnce(fn
: (M: Managed) => Managed): void
Defined in packages/core/tests/Managed.test.ts:14
Parameters:
Name | Type |
---|---|
fn | (M: Managed) => Managed |
Returns: void
itShouldFollowSpec
▸ Const
itShouldFollowSpec(fn
: (M: Managed) => Managed): void
Defined in packages/core/tests/Managed.test.ts:49
Parameters:
Name | Type |
---|---|
fn | (M: Managed) => Managed |
Returns: void
itShouldReleaseAfterUsage
▸ Const
itShouldReleaseAfterUsage(fn
: (M: Managed) => Managed): void
Defined in packages/core/tests/Managed.test.ts:33
Parameters:
Name | Type |
---|---|
fn | (M: Managed) => Managed |
Returns: void
itShouldReleaseOnce
▸ Const
itShouldReleaseOnce(fn
: (M: Managed) => Managed): void
Defined in packages/core/tests/Managed.test.ts:24
Parameters:
Name | Type |
---|---|
fn | (M: Managed) => Managed |
Returns: void
log
▸ Const
log(...t
: unknown[]): QIO<void, never, unknown>
Defined in packages/core/lib/main/Log.ts:4
Parameters:
Name | Type |
---|---|
...t | unknown[] |
Returns: QIO<void, never, unknown>
matechsMapper
▸ Const
matechsMapper(_
: bigint): Effect<unknown, never, bigint>
Defined in packages/benchmarks/IO/NestedChain.ts:13
Parameters:
Name | Type |
---|---|
_ | bigint |
Returns: Effect<unknown, never, bigint>
memoize
▸ Const
memoize<A, B>(fn
: (a: A) => B): (Anonymous function)
Defined in packages/example/fibonacci/Fibonacci.ts:3
Type parameters:
Name |
---|
A |
B |
Parameters:
Name | Type |
---|---|
fn | (a: A) => B |
Returns: (Anonymous function)
putStrLn
▸ Const
putStrLn(...t
: unknown[]): QIO<void, never, ITextTerminalEnv>
Defined in packages/console/lib/Console.ts:99
Outputs anything passed as arguments to the stdout stream
Parameters:
Name | Type |
---|---|
...t | unknown[] |
Returns: QIO<void, never, ITextTerminalEnv>
putStrLn0
▸ Const
putStrLn0(...t
: unknown[]): QIO<void, never, IConsoleEnv>
Defined in packages/console/lib/Console.ts:53
Parameters:
Name | Type |
---|---|
...t | unknown[] |
Returns: QIO<void, never, IConsoleEnv>
qExit
▸ Const
qExit(code
: number): QIO<void, never, IExitEnv>
Defined in packages/scripts/lib/Symlink.ts:16
Parameters:
Name | Type |
---|---|
code | number |
Returns: QIO<void, never, IExitEnv>
qSymLink
▸ Const
qSymLink(path
: string): QIO<void, ErrnoException, { fs: {} }>
Defined in packages/scripts/lib/Symlink.ts:17
Parameters:
Name | Type |
---|---|
path | string |
Returns: QIO<void, ErrnoException, { fs: {} }>
qSymLinkForced
▸ Const
qSymLinkForced(path
: string): QIO<void, ErrnoException, { fs: {} } & { fs: {} }>
Defined in packages/scripts/lib/Symlink.ts:18
Parameters:
Name | Type |
---|---|
path | string |
Returns: QIO<void, ErrnoException, { fs: {} } & { fs: {} }>
qioMapper
▸ Const
qioMapper(_
: bigint): QIO<bigint, never, unknown>
Defined in packages/benchmarks/IO/NestedChain.ts:12
Parameters:
Name | Type |
---|---|
_ | bigint |
Returns: QIO<bigint, never, unknown>
qioRecursion
▸ Const
qioRecursion(numbers
: number[]): QIO<number, never, unknown>
Defined in packages/benchmarks/Stream/Stream.ts:28
Parameters:
Name | Type |
---|---|
numbers | number[] |
Returns: QIO<number, never, unknown>
randomInt
▸ Const
randomInt(min
: number, max
: number): QIO<number, never, IMath>
Defined in packages/example/guess-the-number/src/Program.ts:25
Returns a random number within the provide range.
Parameters:
Name | Type |
---|---|
min | number |
max | number |
Returns: QIO<number, never, IMath>
range
▸ Const
range<A>(s
: number, b
: number, fn
: (i: number) => A): A[]
Defined in packages/prelude/Range.ts:1
Type parameters:
Name |
---|
A |
Parameters:
Name | Type |
---|---|
s | number |
b | number |
fn | (i: number) => A |
Returns: A[]
request
▸ Const
request(config
: IHttpRequestConfig): QIO<AxiosResponse<any>, Error | AxiosError<any>, IHttpEnv>
Defined in packages/http/lib/Http.ts:38
Parameters:
Name | Type |
---|---|
config | IHttpRequestConfig |
Returns: QIO<AxiosResponse<any>, Error | AxiosError<any>, IHttpEnv>
split
▸ Const
split(min
: number, max
: number, count
: number, expected
: number): number
Defined in packages/core/lib/main/Chunk.ts:3
Parameters:
Name | Type |
---|---|
min | number |
max | number |
count | number |
expected | number |
Returns: number
testRuntime
▸ Const
testRuntime(scheduler
: TestScheduler): TestRuntime
Defined in packages/core/lib/runtimes/TestRuntime.ts:40
Parameters:
Name | Type | Default value |
---|---|---|
scheduler | TestScheduler | testScheduler() |
Returns: TestRuntime
testTTY
▸ Const
testTTY(input
: { [k:string]: QIO<string>; }): ITextTerminalTest
Defined in packages/console/lib/Console.ts:69
Mock implementation of ITextTerminal
Parameters:
Name | Type | Default value |
---|---|---|
input | { [k:string]: QIO<string>; } | {} |
Returns: ITextTerminalTest
Object literals
Exit
▪ Const
Exit: object = QIO.encase((message: Error) => { process.exit(1)})
Defined in packages/core/lib/main/Exit.ts:24
Defined in packages/prototype/FServer.ts:4
Properties:
Name | Type | Value |
---|---|---|
cancel | function | () => FiberCancelled |
fail | function | <E>(cause: E) => FiberFailure<E> |
fold | function | <A, E>(exit: Exit<A, E>) => (Anonymous function) |
succeed | function | <A>(value: A) => FiberSuccess<A> |
FSEnv
▪ Const
FSEnv: object
Defined in packages/fs/lib/FS.ts:38
TODO: Keep adding all the node fs methods on by one.
Properties:
Name | Type | Value | |||||
---|---|---|---|---|---|---|---|
close | function | (fd: number) => QIOErrno<void> | |||||
copyFile | function | (src: fs.PathLike, dest: fs.PathLike) => QIOErrno<void> | |||||
open | function | (path: fs.PathLike, mode: string, flag?: undefined \ | number) => QIOErrno<number> | ||||
readFile | function | (path: fs.PathLike \ | number, options?: undefined \ | { encoding?: undefined \ | null ; flag?: undefined \ | string }) => QIOErrno<string \ | Buffer> |
readdir | function | (path: string, options?: { encoding: BufferEncoding \ | null ; withFileTypes?: undefined \ | false } \ | BufferEncoding) => QIOErrno<string[]> | ||
symlink | function | (target: fs.PathLike, path: fs.PathLike) => QIOErrno<void> | |||||
unlink | function | (path: fs.PathLike) => QIOErrno<void> | |||||
writeFile | function | (path: fs.PathLike \ | number, data: string \ | NodeJS.ArrayBufferView, options: fs.WriteFileOptions) => QIOErrno<void> |
FiberConfig
▪ Const
FiberConfig: object
Defined in packages/core/lib/internals/FiberConfig.ts:23
Properties:
Name | Type | Value | |
---|---|---|---|
MAX_DURATION | function | (maxDuration: number) => IDurationM | |
MAX_INSTRUCTION_COUNT | function | (maxInstructionCount?: undefined \ | number) => IAsapM |
DEFAULT |
TTY
▪ Const
TTY: object
Defined in packages/console/lib/Console.ts:61
Properties:
Name | Type | Value |
---|---|---|
getStrLn | function | QIO.pipeEnv(getStrLn0, {process, readLine: R}) |
putStrLn | function | QIO.pipeEnv(putStrLn0, {console}) |
httpEnv
▪ Const
httpEnv: object
Defined in packages/http/lib/Http.ts:47
Properties:
Name | Type | Value |
---|---|---|
request | function | (config: IHttpRequestConfig) => QIO<AxiosResponse<any>, AxiosError<any>, unknown> |