(sources: So, scope: string)
| 24 | } |
| 25 | |
| 26 | function isolateAllSources<So extends Sources>(sources: So, scope: string): So { |
| 27 | const scopedSources = {} as So; |
| 28 | for (const key in sources) { |
| 29 | const source = sources[key] as Partial<IsolateableSource>; |
| 30 | if (sources.hasOwnProperty(key) |
| 31 | && source |
| 32 | && typeof source.isolateSource === 'function') { |
| 33 | scopedSources[key] = source.isolateSource(source, scope); |
| 34 | } else if (sources.hasOwnProperty(key)) { |
| 35 | scopedSources[key] = sources[key]; |
| 36 | } |
| 37 | } |
| 38 | return scopedSources; |
| 39 | } |
| 40 | |
| 41 | function isolateAllSinks<So extends Sources, Si>(sources: So, sinks: Si, scope: string): Si { |
| 42 | const scopedSinks = {} as Si; |
no test coverage detected