Success<T>Source effect/Config.ts:4181 lines
export type type Success<T> = [T] extends [
Config<infer A>
]
? A
: never
Extracts the successfully parsed value type from a Config.
When to use
Use to derive the parsed value type from an existing Config value when
declaring reusable config-driven types.
Success<function (type parameter) T in type Success<T>T> = [function (type parameter) T in type Success<T>T] extends [interface Config<out T>A recipe for extracting a typed value T from a ConfigProvider.
When to use
Use to describe typed configuration that can be parsed from a provider or
yielded inside Effect.gen.
Details
Key members:
parse(provider, pathPrefix?) – runs the config against a specific provider.
The optional path prefix is the logical scope accumulated from outer
Config.nested calls.
- Yieldable – can be yielded inside
Effect.gen, which automatically
resolves the current ConfigProvider from the context.
- Pipeable – supports
.pipe(Config.map(...)) etc.
Config<infer function (type parameter) AA>] ? function (type parameter) AA : never