/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/core/src/location-service-map.ts
18 строк
686 B
James Long
refactor(core): rename app node modules (#34238)
27 июн 2026, 19:29
Не верифицирован
27 июн 2026, 19:29
a76c691
Код
Авторство
О чём код?
import { Context, Effect, Layer, LayerMap } from "effect" import { LayerNode } from "./effect/layer-node" import { Node } from "./effect/app-node" import { Location } from "./location" import type { LocationError, LocationServices } from "./location-services" export class Service extends Context.Service< Service, LayerMap.LayerMap<Location.Ref, LocationServices, LocationError> >()("@opencode/example/LocationServiceMap") { static get(ref: Location.Ref) { return Layer.unwrap(Effect.map(Service, (locations) => locations.get(ref))) } } export const node = LayerNode.unbound(Service, Node.tags.values.global) export * as LocationServiceMap from "./location-service-map"