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