(ref: Reference<any>)
| 1038 | const defaultValueCacheKey = "~effect/Context/defaultValue" as const |
| 1039 | |
| 1040 | const getDefaultValue = (ref: Reference<any>) => { |
| 1041 | if (defaultValueCacheKey in ref) { |
| 1042 | return ref[defaultValueCacheKey] as any |
| 1043 | } |
| 1044 | return (ref as any)[defaultValueCacheKey] = ref.defaultValue() |
| 1045 | } |
| 1046 | |
| 1047 | const serviceNotFoundError = (service: Key<any, any>) => { |
| 1048 | const error = new Error( |