@@ -28,6 +28,7 @@ import * as MRef from "../MutableRef.js"
28
28
import * as Option from "../Option.js"
29
29
import { pipeArguments } from "../Pipeable.js"
30
30
import * as Predicate from "../Predicate.js"
31
+ import type * as Random from "../Random.js"
31
32
import * as RA from "../ReadonlyArray.js"
32
33
import * as Ref from "../Ref.js"
33
34
import type { Entry , Request } from "../Request.js"
@@ -59,6 +60,7 @@ import * as metric from "./metric.js"
59
60
import * as metricBoundaries from "./metric/boundaries.js"
60
61
import * as metricLabel from "./metric/label.js"
61
62
import * as OpCodes from "./opCodes/effect.js"
63
+ import { randomTag } from "./random.js"
62
64
import { complete } from "./request.js"
63
65
import * as _runtimeFlags from "./runtimeFlags.js"
64
66
import { OpSupervision } from "./runtimeFlags.js"
@@ -2705,6 +2707,10 @@ export const validateFirst = dual<
2705
2707
export const withClockScoped = < A extends Clock . Clock > ( value : A ) =>
2706
2708
fiberRefLocallyScopedWith ( defaultServices . currentServices , Context . add ( clock . clockTag , value ) )
2707
2709
2710
+ /* @internal */
2711
+ export const withRandomScoped = < A extends Random . Random > ( value : A ) =>
2712
+ fiberRefLocallyScopedWith ( defaultServices . currentServices , Context . add ( randomTag , value ) )
2713
+
2708
2714
/* @internal */
2709
2715
export const withConfigProviderScoped = ( value : ConfigProvider ) =>
2710
2716
fiberRefLocallyScopedWith ( defaultServices . currentServices , Context . add ( configProviderTag , value ) )
0 commit comments