Skip to content

Commit 3f4e4a3

Browse files
committed
.
1 parent dfb79ad commit 3f4e4a3

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wxu",
3-
"version": "0.0.87",
3+
"version": "0.0.88",
44
"type": "module",
55
"description": "WXU TypeScript Package",
66
"source": "src/index.ts",

ts/src/functions/openInputStream.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { FsPermissionError } from "../classes/FsPermissionError";
22
import { FsStreamError } from "../classes/FsStreamError";
3-
import type { ReadableStreamInit } from "../interfaces/ReadableStreamInit";
3+
import type { FsStreamInit } from "../interfaces/FsStreamInit";
44

55
// Default configuration for readable streams
6-
export const readableStreamInit: ReadableStreamInit = {
6+
export const fsStreamInit: FsStreamInit = {
77
headers: {
88
"Content-Type": "application/octet-stream",
99
},
@@ -15,7 +15,7 @@ export const readableStreamInit: ReadableStreamInit = {
1515
* @param init - Optional configuration for the readable stream
1616
* @returns Promise that resolves to a Response object containing the file data
1717
*/
18-
export async function openInputStream(path: string, init: ReadableStreamInit = {}): Promise<Response> {
18+
export async function openInputStream(path: string, init: FsStreamInit = {}): Promise<Response> {
1919
// Validate input parameters
2020
if (typeof path !== "string") {
2121
throw new TypeError("'path' must be a string");
@@ -30,8 +30,8 @@ export async function openInputStream(path: string, init: ReadableStreamInit = {
3030
throw new FsPermissionError("INPUT");
3131
}
3232

33-
const mergedInit: ReadableStreamInit = {
34-
...readableStreamInit,
33+
const mergedInit: FsStreamInit = {
34+
...fsStreamInit,
3535
...init,
3636
};
3737

ts/src/interfaces/FsStreamInit.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export interface FsStreamInit extends ResponseInit {
2+
signal?: AbortSignal;
3+
}

ts/src/interfaces/ReadableStreamInit.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

ts/src/interfaces/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
* Automatically generated by the bundler. DO NOT EDIT!
33
*/
44

5-
export type * from "./ReadableStreamInit";
5+
export type * from "./FsStreamInit";

0 commit comments

Comments
 (0)