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

Function omit

packages/effect/src/Context.ts:1268–1276  ·  view source on GitHub ↗
(
  ...keys: S
)

Source from the content-addressed store, hash-verified

1266 * @since 2.0.0
1267 */
1268export const omit = <S extends ReadonlyArray<Key<any, any>>>(
1269 ...keys: S
1270) =>
1271<Services>(self: Context<Services>): Context<Exclude<Services, Service.Identifier<S[number]>>> =>
1272 withFlat(self, (map) => {
1273 for (let i = 0; i < keys.length; i++) {
1274 map.delete(keys[i].key)
1275 }
1276 })
1277
1278/**
1279 * Creates a context key with a default value.

Callers 1

Context.tsFile · 0.70

Calls 1

withFlatFunction · 0.85

Tested by

no test coverage detected