Skip to content

Commit c313355

Browse files
committed
rd-inc
1 parent 2837ab7 commit c313355

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"path-to-regexp": "6.2.0",
3131
"prettier": "3.3.3",
3232
"react": "18.2.0",
33-
"react-declarative": "2.7.85",
33+
"react-declarative": "2.7.86",
3434
"react-dom": "18.2.0",
3535
"react-split": "2.0.14",
3636
"react-split-it": "2.0.0",

public/react-declarative.d.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ declare module "react-declarative" {
817817
scaleToSize,
818818
createScaleToSize,
819819
} from "react-declarative/utils/scaleToSize";
820-
export { timeout, TimeoutError } from "react-declarative/utils/hof/timeout";
820+
export { timeout, TIMEOUT_SYMBOL } from "react-declarative/utils/hof/timeout";
821821
export { waitForNext } from "react-declarative/utils/hof/waitForNext";
822822
export { obsolete } from "react-declarative/utils/hof/obsolete";
823823
export { singleshot } from "react-declarative/utils/hof/singleshot";
@@ -8139,21 +8139,22 @@ declare module "react-declarative/utils/scaleToSize" {
81398139
}
81408140

81418141
declare module "react-declarative/utils/hof/timeout" {
8142-
export class TimeoutError extends Error {}
8143-
export const timeout: <T extends (...args: any[]) => any>(
8144-
run: T,
8142+
export const TIMEOUT_SYMBOL: unique symbol;
8143+
export const timeout: <T extends unknown = any, P extends any[] = any[]>(
8144+
run: (...args: P) => Promise<T>,
81458145
delay?: number,
8146-
) => T;
8146+
) => (...args: P) => Promise<symbol | T>;
81478147
export default timeout;
81488148
}
81498149

81508150
declare module "react-declarative/utils/hof/waitForNext" {
8151+
import { TIMEOUT_SYMBOL } from "react-declarative/utils/hof/timeout";
81518152
import { TSubject } from "react-declarative/utils/rx/Subject";
81528153
export const waitForNext: <T = any>(
81538154
subject: TSubject<T>,
81548155
condition: (t: T) => boolean,
81558156
delay?: number,
8156-
) => Promise<T>;
8157+
) => Promise<typeof TIMEOUT_SYMBOL | T>;
81578158
export default waitForNext;
81588159
}
81598160

0 commit comments

Comments
 (0)