Skip to content

Commit

Permalink
fix: make spawnChunkStore reducible
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Jan 10, 2025
1 parent 6786129 commit c04f309
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/main/ts/spawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export type TPushable<T = any> = { push(...args: T[]): number }

export type TJoinable = { join(sep?: string): string }

export type TArrayLike<T> = Iterable<T> & TPushable<T> & TJoinable & { length: number, [i: number]: T | undefined }
export type TReducible<T, R> = { reduce<U>(fn: (acc: U, cur: T, i: number, arr: T[]) => U, init: U): R }

export type TArrayLike<T> = Iterable<T> & TPushable<T> & TJoinable & TReducible<T, any> &{ length: number, [i: number]: T | undefined }

export type TSpawnStoreChunks = TArrayLike<string| Buffer>

Expand Down
6 changes: 3 additions & 3 deletions target/cjs/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ const {


// src/main/ts/index.ts
var index_exports = {};
__export(index_exports, {
var ts_exports = {};
__export(ts_exports, {
$: () => $,
buildCmd: () => import_util5.buildCmd,
defaults: () => import_spawn2.defaults,
exec: () => import_spawn2.exec,
invoke: () => import_spawn2.invoke,
zurk: () => import_zurk5.zurk
});
module.exports = __toCommonJS(index_exports);
module.exports = __toCommonJS(ts_exports);
var import_spawn2 = require("./spawn.cjs");

// src/main/ts/x.ts
Expand Down
5 changes: 4 additions & 1 deletion target/dts/spawn.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ export type TPushable<T = any> = {
export type TJoinable = {
join(sep?: string): string;
};
export type TArrayLike<T> = Iterable<T> & TPushable<T> & TJoinable & {
export type TReducible<T, R> = {
reduce<U>(fn: (acc: U, cur: T, i: number, arr: T[]) => U, init: U): R;
};
export type TArrayLike<T> = Iterable<T> & TPushable<T> & TJoinable & TReducible<T, any> & {
length: number;
[i: number]: T | undefined;
};
Expand Down

0 comments on commit c04f309

Please sign in to comment.