const Props = getPropsTag<Component>();
type test1 = Stream.Stream.Success<
// ^? type test1 = number & Brand<"count">
Context.Tag.Service<typeof Props>['count']
>;
class CountStream extends Effect.Service<CountStream>()('Count', {
effect: Effect.gen(function* () {
const { count } = yield* Props;
return count.pipe(Stream.map((a) => a * 2));
}),
}) {}
type test2 = Stream.Stream.Success<typeof CountStream.Service>;
// ^? type test2 = number
const Props = getPropsTag<Component>();
type test1 = Stream.Stream.Success<
// ^? type test1 = number & Brand<"count">
Context.Tag.Service<typeof Props>['count']
>;
class CountStream extends Effect.Service<CountStream>()('Count', {
effect: Effect.gen(function* () {
const { count } = yield* Props;
return count.pipe(Stream.map((a) => a * 2));
}),
}) {}
type test2 = Stream.Stream.Success<typeof CountStream.Service>;
// ^? type test2 = number