add claude skills
This commit is contained in:
11
src/option/CLAUDE.md
Normal file
11
src/option/CLAUDE.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Option conventions
|
||||
|
||||
- `match()` takes **2 callbacks**: `(onSome, onNone)`
|
||||
- `filter()` takes ONLY a predicate — **no errorFactory** (unlike Result)
|
||||
- `mapErr()` and `flatMapErr()` do **NOT exist** on Option
|
||||
- `none()` returns a frozen singleton
|
||||
- `Option.from()` treats only `null | undefined` as None — `0`, `false`, `""` become `Some`
|
||||
- `flatMap` callback must return `Option<any>`
|
||||
- Async return type: `OptionPromise<T>` — never `Promise<Option<T>>`
|
||||
|
||||
See `/native-monad-option` skill for full API reference.
|
||||
Reference in New Issue
Block a user