(fileName: string, options?: {
readonly formats?: ReadonlyArray<ConfigFile.Kind>
readonly searchPaths?: ReadonlyArray<string>
})
| 59 | |
| 60 | /** @internal */ |
| 61 | export const layer = (fileName: string, options?: { |
| 62 | readonly formats?: ReadonlyArray<ConfigFile.Kind> |
| 63 | readonly searchPaths?: ReadonlyArray<string> |
| 64 | }): Layer.Layer<never, ConfigFile.ConfigFileError, Path.Path | FileSystem.FileSystem> => |
| 65 | pipe( |
| 66 | makeProvider(fileName, options), |
| 67 | Effect.map((provider) => |
| 68 | Layer.fiberRefLocallyScopedWith(DefaultServices.currentServices, (services) => { |
| 69 | const current = Context.get(services, ConfigProvider.ConfigProvider) |
| 70 | return Context.add(services, ConfigProvider.ConfigProvider, ConfigProvider.orElse(current, () => provider)) |
| 71 | }) |
| 72 | ), |
| 73 | Layer.unwrapEffect |
| 74 | ) |
| 75 | |
| 76 | /** @internal */ |
| 77 | export const ConfigErrorTypeId: ConfigFile.ConfigErrorTypeId = Symbol.for( |
nothing calls this directly
no test coverage detected
searching dependent graphs…