import { Context, Effect, Schema } from 'effect'
import { Line } from '../types'
export interface Service<T, I> {
readonly schema: Schema.Schema<Line<T>, I>
readonly processValidLine: (validLine: Line<T>) => Effect.Effect<unknown>
}
export class Tag extends Context.Tag('@service')<
Tag,
Service<
{
[key: string]: unknown
},
{
[key: string]: unknown
}
>
>() {}
import { Context, Effect, Schema } from 'effect'
import { Line } from '../types'
export interface Service<T, I> {
readonly schema: Schema.Schema<Line<T>, I>
readonly processValidLine: (validLine: Line<T>) => Effect.Effect<unknown>
}
export class Tag extends Context.Tag('@service')<
Tag,
Service<
{
[key: string]: unknown
},
{
[key: string]: unknown
}
>
>() {}