(cache: NodeCache)
| 200 | |
| 201 | // what a node is called as, so a Type deferred until it's read is the same function |
| 202 | const callableOf = (cache: NodeCache) => |
| 203 | // not bound to a name, which a Type would have |
| 204 | (cache.self = ( |
| 205 | data: any, |
| 206 | pipedFromCtx?: Traversal | undefined, |
| 207 | onFail?: ArkErrors.Handler | null |
| 208 | ) => { |
| 209 | if (pipedFromCtx) return pipeCalled(pipedFromCtx, cache.self, data) |
| 210 | |
| 211 | const rootApply = cache.rootApply |
| 212 | return rootApply === undefined ? |
| 213 | cache.self.initRootApply()(data, onFail) |
| 214 | : rootApply(data, onFail) |
| 215 | }) |
| 216 | |
| 217 | /** a callable and cache a Type holds until it's read, and then is a node of its kind */ |
| 218 | export const deferredCallable = (): { fn: Function; c: object } => { |
no test coverage detected