apple / apple/swift-configuration

ConfigReader methods that take a transform closure

Open
#22 0 comments 1 reaction 0 assignees View on GitHub
good first issue status/needs-design
Dominant language
Swift
Stars
811
Forks
60
Avg merge
9h 38m
Merged PRs (30d)
6

Description

It might be useful to have a transform variant:

```swift
let foo = config.string(forKey: "foo", as: Foo.self, default: .bar) { rawString in
// turn string into a Foo
}
```

Contributor guide

Open the contributing guide

Research direction

Start by locating the ConfigReader methods that read typed values and accept defaults, then compare their existing overloads with the proposed transform-closure form. Done means the relevant methods support the shown string-to-Foo conversion while preserving default handling and the existing API behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.