@internal
| 41 | |
| 42 | /** @internal */ |
| 43 | class Local implements FiberScope { |
| 44 | readonly [FiberScopeTypeId]: FiberScopeTypeId = FiberScopeTypeId |
| 45 | constructor( |
| 46 | readonly fiberId: FiberId.FiberId, |
| 47 | readonly parent: FiberRuntime.FiberRuntime<any, any> |
| 48 | ) { |
| 49 | } |
| 50 | add(_runtimeFlags: RuntimeFlags.RuntimeFlags, child: FiberRuntime.FiberRuntime<any, any>): void { |
| 51 | this.parent.tell( |
| 52 | FiberMessage.stateful((parentFiber) => { |
| 53 | parentFiber.addChild(child) |
| 54 | child.addObserver(() => { |
| 55 | parentFiber.removeChild(child) |
| 56 | }) |
| 57 | }) |
| 58 | ) |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | /** @internal */ |
| 63 | export const unsafeMake = (fiber: FiberRuntime.FiberRuntime<any, any>): FiberScope => { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…