@fncts/node 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_cjs/fs/api.cjs +46 -110
- package/_cjs/fs/api.cjs.map +1 -1
- package/_cjs/fs.cjs +0 -2
- package/_cjs/fs.cjs.map +1 -1
- package/_cjs/stream/api.cjs +103 -0
- package/_cjs/stream/api.cjs.map +1 -0
- package/_cjs/stream.cjs +17 -0
- package/_cjs/stream.cjs.map +1 -0
- package/_mjs/fs/api.mjs +46 -46
- package/_mjs/fs/api.mjs.map +1 -1
- package/_mjs/fs.mjs.map +1 -1
- package/_mjs/stream/api.mjs +89 -0
- package/_mjs/stream/api.mjs.map +1 -0
- package/_mjs/stream.mjs +3 -0
- package/_mjs/stream.mjs.map +1 -0
- package/_src/fs/api.ts +2 -2
- package/_src/index.ts +1 -0
- package/_src/stream/api.ts +114 -0
- package/_src/stream.ts +3 -0
- package/index.d.ts +1 -0
- package/package.json +2 -2
- package/stream/api.d.ts +30 -0
- package/stream.d.ts +1 -0
package/stream/api.d.ts
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { Lazy } from "@fncts/base/data/function/definition";
|
3
|
+
import { Byte } from "@fncts/base/data/Byte";
|
4
|
+
import { Sink } from "@fncts/io/Sink/definition";
|
5
|
+
import { Channel } from "@fncts/io/Channel";
|
6
|
+
import { Conc } from "@fncts/base/collection/immutable/Conc";
|
7
|
+
import type stream from "node:stream";
|
8
|
+
import { Stream } from "@fncts/io/Stream";
|
9
|
+
export declare class ReadableError {
|
10
|
+
readonly error: Error;
|
11
|
+
readonly _tag = "ReadableError";
|
12
|
+
constructor(error: Error);
|
13
|
+
}
|
14
|
+
export declare function fromReadable(readable: Lazy<stream.Readable>): Stream<never, ReadableError, Byte>;
|
15
|
+
export declare class WritableError {
|
16
|
+
readonly error: Error;
|
17
|
+
readonly _tag = "ReadableError";
|
18
|
+
constructor(error: Error);
|
19
|
+
}
|
20
|
+
export declare function fromWritable(writable: Lazy<stream.Writable>): Sink<never, WritableError, Byte, never, void>;
|
21
|
+
export declare class TransformError {
|
22
|
+
readonly error: Error;
|
23
|
+
readonly _tag = "TransformError";
|
24
|
+
constructor(error: Error);
|
25
|
+
}
|
26
|
+
/**
|
27
|
+
* @tsplus pipeable fncts.io.Stream transform
|
28
|
+
* @tsplus location "@fncts/node/stream/api"
|
29
|
+
*/
|
30
|
+
export declare function transform(transform: Lazy<stream.Transform>): <R, E>(self: Stream<R, E, number>) => Stream<R, TransformError | E, number>;
|
package/stream.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./stream/api.js";
|