(...tags: Tags)
| 310 | /** @internal */ |
| 311 | export const pick = |
| 312 | <Tags extends ReadonlyArray<C.Tag<any, any>>>(...tags: Tags) => |
| 313 | <Services>(self: C.Context<Services>): C.Context< |
| 314 | Services & C.Tag.Identifier<Tags[number]> |
| 315 | > => { |
| 316 | const tagSet = new Set<string>(tags.map((_) => _.key)) |
| 317 | const newEnv = new Map() |
| 318 | for (const [tag, s] of self.unsafeMap.entries()) { |
| 319 | if (tagSet.has(tag)) { |
| 320 | newEnv.set(tag, s) |
| 321 | } |
| 322 | } |
| 323 | return makeContext(newEnv) |
| 324 | } |
| 325 | |
| 326 | /** @internal */ |
| 327 | export const omit = |
nothing calls this directly
no test coverage detected
searching dependent graphs…