Skip to content

Commit

Permalink
fix compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly-t committed Aug 9, 2024
1 parent 2648daf commit 56ec5c4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion benchmarks/src/async.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {testIterOps} from './tests/iter-ops';
import {testRXJS} from './tests/rxjs';
import {toAsync} from '../../';
import {toAsync} from '../../src';

// tslint:disable:no-console

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/tests/iter-ops.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {type UnknownIterable, filter, map, pipe, toArray} from '../../../';
import {type UnknownIterable, filter, map, pipe, toArray} from '../../../src';

export async function testIterOps(input: UnknownIterable<number>) {
const start = Date.now();
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/tests/rxjs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {UnknownIterable} from '../../../';
import {UnknownIterable} from '../../../src';

Check failure on line 1 in benchmarks/src/tests/rxjs.ts

View workflow job for this annotation

GitHub Actions / Linting Checks

All imports in the declaration are only used as types. Use `import type`
import {filter, firstValueFrom, from, map, toArray} from 'rxjs';

export async function testRXJS(
Expand Down
23 changes: 13 additions & 10 deletions src/ops/retry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,24 @@ export function retry<T>(attempts: number): Operation<T, T>;
* @category Sync+Async
*/
export function retry<T>(
cb: Retry<boolean | Promise<boolean>>
retry: (cb: {
attempt: number,

Check failure on line 76 in src/ops/retry.ts

View workflow job for this annotation

GitHub Actions / Linting Checks

Replace `,` with `;`
error: any,

Check failure on line 77 in src/ops/retry.ts

View workflow job for this annotation

GitHub Actions / Linting Checks

Replace `,` with `;`
index: number,

Check failure on line 78 in src/ops/retry.ts

View workflow job for this annotation

GitHub Actions / Linting Checks

Replace `,` with `;`
state: IterationState

Check failure on line 79 in src/ops/retry.ts

View workflow job for this annotation

GitHub Actions / Linting Checks

Insert `;`
}) => boolean | Promise<boolean>
): Operation<T, T>;

export function retry(...args: unknown[]) {
return createOperation(retrySync, retryAsync, args);
}

type Retry<T> =
| number
| (({
attempt: number,
error: any,
index: number,
state: IterationState
}) => T);
type Retry<T> = number | ((cb: {

Check failure on line 87 in src/ops/retry.ts

View workflow job for this annotation

GitHub Actions / Linting Checks

Replace `·number` with `⏎····|·number⏎···`
attempt: number,

Check failure on line 88 in src/ops/retry.ts

View workflow job for this annotation

GitHub Actions / Linting Checks

Replace `attempt:·number,` with `······attempt:·number;`
error: any,

Check failure on line 89 in src/ops/retry.ts

View workflow job for this annotation

GitHub Actions / Linting Checks

Replace `····error:·any,` with `··········error:·any;`
index: number,

Check failure on line 90 in src/ops/retry.ts

View workflow job for this annotation

GitHub Actions / Linting Checks

Replace `····index:·number,` with `··········index:·number;`
state: IterationState

Check failure on line 91 in src/ops/retry.ts

View workflow job for this annotation

GitHub Actions / Linting Checks

Replace `state:·IterationState` with `······state:·IterationState;`
}) => T);

function retrySync<T>(
iterable: Iterable<T>,
Expand Down Expand Up @@ -161,7 +164,7 @@ function retryAsync<T>(
f
? this.next()
: // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
Promise.reject(error);
Promise.reject(error);
const r = cb({
attempt,
index,
Expand Down

0 comments on commit 56ec5c4

Please sign in to comment.