Skip to content

Commit 5bb178d

Browse files
committed
chore: fix some type errors
1 parent e511b9d commit 5bb178d

6 files changed

Lines changed: 10 additions & 53 deletions

File tree

packages/batcher/core/batch-processor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class BatchProcessor<T extends DefaultBatcherInput> {
1919
{
2020
resolve: (result: any) => void;
2121
reject: (error: Error) => void;
22-
timeoutId: number;
22+
timeoutId: ReturnType<typeof setTimeout>;
2323
}
2424
>;
2525
waitForEffectStreamProcessed: (

packages/batcher/core/batcher.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class Batcher<T extends DefaultBatcherInput = DefaultBatcherInput> {
6464
/** Namespace used for signature verification messages */
6565
namespace: string = "effectstream_batcher";
6666
/** Timer ID for periodic batch processing */
67-
private pollingIntervalID?: number;
67+
private pollingIntervalID?: ReturnType<typeof setInterval>;
6868
/** Available blockchain adapters keyed by target name */
6969
private adapters: Record<string, BlockchainAdapter<any>>;
7070
/** Default target to use when input.target is not specified */
@@ -96,7 +96,7 @@ export class Batcher<T extends DefaultBatcherInput = DefaultBatcherInput> {
9696
{
9797
resolve: (result: BlockchainTransactionReceipt) => void;
9898
reject: (error: Error) => void;
99-
timeoutId: number;
99+
timeoutId: ReturnType<typeof setTimeout>;
100100
}
101101
> = new Map();
102102
/** Batch processor for handling complex batch operations */
@@ -596,7 +596,7 @@ export class Batcher<T extends DefaultBatcherInput = DefaultBatcherInput> {
596596

597597
let subscriptionReference: symbol | undefined = undefined;
598598
let latestBlock = 0;
599-
let timer: number | undefined = undefined;
599+
let timer: ReturnType<typeof setTimeout> | undefined = undefined;
600600

601601
try {
602602
const result = await Promise.race([

packages/build-tools/explorer/client/src/hooks/useTableData.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,9 +776,9 @@ export function useTableData() {
776776

777777
// Initialize and setup refresh intervals
778778
useEffect(() => {
779-
let primitiveRefreshInterval: number;
780-
let userTableRefreshInterval: number;
781-
let scheduledDataRefreshInterval: number;
779+
let primitiveRefreshInterval: ReturnType<typeof setInterval>;
780+
let userTableRefreshInterval: ReturnType<typeof setInterval>;
781+
let scheduledDataRefreshInterval: ReturnType<typeof setInterval>;
782782

783783
const initialize = async () => {
784784
// Initialize tables

packages/build-tools/orchestrator/src/logging.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ export const logHandler = (options: {
225225
}
226226
};
227227

228-
let timeout: number | null = null;
228+
let timeout: ReturnType<typeof setTimeout> | null = null;
229229
// TODO This should use the logsConfig.tuiPort instead of the ENV.TUI_LOG_PORT
230230
const tuiUrl = ENV.TUI_LOG_URL + ":" + ENV.TUI_LOG_PORT /* logsConfig.tuiPort */;
231231

packages/effectstream-sdk/utils/src/runtime-spawn.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ export function spawn(command: string, options: SpawnOptions = {}): SpawnChild {
8282

8383
const stdout: ReadableStream<Uint8Array> =
8484
options.stdout === "piped" && cp.stdout
85-
? (Readable.toWeb(cp.stdout) as ReadableStream<Uint8Array>)
85+
? (Readable.toWeb(cp.stdout) as unknown as ReadableStream<Uint8Array>)
8686
: emptyReadableStream();
8787
const stderr: ReadableStream<Uint8Array> =
8888
options.stderr === "piped" && cp.stderr
89-
? (Readable.toWeb(cp.stderr) as ReadableStream<Uint8Array>)
89+
? (Readable.toWeb(cp.stderr) as unknown as ReadableStream<Uint8Array>)
9090
: emptyReadableStream();
9191

9292
const status = new Promise<{

packages/effectstream-sdk/wallets/scripts/build_npm.ts

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

0 commit comments

Comments
 (0)