@@ -9,6 +9,7 @@ import type * as O from "../Option.js"
99import { pipeArguments } from "../Pipeable.js"
1010import { hasProperty } from "../Predicate.js"
1111import type * as STM from "../STM.js"
12+ import type { NoInfer } from "../Types.js"
1213import { EffectPrototype , effectVariance } from "./effectable.js"
1314import * as option from "./option.js"
1415
@@ -202,24 +203,22 @@ const _empty = makeContext(new Map())
202203export const empty = ( ) : C . Context < never > => _empty
203204
204205/** @internal */
205- export const make = < T extends C . Tag < any , any > > (
206- tag : T ,
207- service : C . Tag . Service < T >
208- ) : C . Context < C . Tag . Identifier < T > > => makeContext ( new Map ( [ [ tag . key , service ] ] ) )
206+ export const make = < I , S > ( tag : C . Tag < I , S > , service : NoInfer < S > ) : C . Context < I > =>
207+ makeContext ( new Map ( [ [ tag . key , service ] ] ) )
209208
210209/** @internal */
211210export const add = dual <
212- < T extends C . Tag < any , any > > (
213- tag : T ,
214- service : C . Tag . Service < T >
211+ < I , S > (
212+ tag : C . Tag < I , S > ,
213+ service : NoInfer < S >
215214 ) => < Services > (
216215 self : C . Context < Services >
217- ) => C . Context < Services | C . Tag . Identifier < T > > ,
218- < Services , T extends C . Tag < any , any > > (
216+ ) => C . Context < Services | I > ,
217+ < Services , I , S > (
219218 self : C . Context < Services > ,
220- tag : T ,
221- service : C . Tag . Service < T >
222- ) => C . Context < Services | C . Tag . Identifier < T > >
219+ tag : C . Tag < I , S > ,
220+ service : NoInfer < S >
221+ ) => C . Context < Services | I >
223222> ( 3 , ( self , tag , service ) => {
224223 const map = new Map ( self . unsafeMap )
225224 map . set ( tag . key , service )
0 commit comments