( info: Info<P, M>, )
| 169 | } |
| 170 | |
| 171 | export function init<P extends Schema.Decoder<unknown>, M extends Metadata>( |
| 172 | info: Info<P, M>, |
| 173 | ): Effect.Effect<Def<P, M>> { |
| 174 | return Effect.gen(function* () { |
| 175 | const init = yield* info.init() |
| 176 | return { |
| 177 | ...init, |
| 178 | id: info.id, |
| 179 | } |
| 180 | }) |
| 181 | } |
| 182 | |
| 183 | export * as Tool from "./tool" |