# session.settings.Session.typed_option

- **Module:** session.settings.Session
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/session/settings.rs#L494
- **Page:** https://libtmux.org/reference/rs/session-settings-session-typed_option/

```
session.settings.Session.typed_option(self, name: &str) -> Result<Option<OptionValue>, Error>
```

Read one option, decoded according to what tmux declares about it.

A flag comes back as [`OptionValue::Flag`] and a number as
[`OptionValue::Number`], so a caller does not decide for itself that
`on` means one. Everything else, including user options, stays text.

# Errors

Returns an error when tmux does not recognize the option name.
