MCPcopy Create free account
hub / github.com/Effect-TS/effect / singleton

Function singleton

packages/effect/src/Record.ts:1422–1424  ·  view source on GitHub ↗
(key: K, value: A)

Source from the content-addressed store, hash-verified

1420 * @since 2.0.0
1421 */
1422export const singleton = <K extends string | symbol, A>(key: K, value: A): Record<K, A> => ({
1423 [key]: value
1424} as any)
1425
1426/**
1427 * Creates a `Reducer` for combining `Record`s using union, with values for keys that exist in both records combined

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected