# `BB.Dsl.ChildSpecOptions`
[🔗](https://github.com/beam-bots/bb/blob/main/lib/bb/dsl/child_spec_options.ex#L5)

A child spec's options, resolved as far as compile time allows.

Used by the verifiers that need to ask a component module about itself before
the robot exists - what options it accepts, what its driver can do - so they
all take the same view of a `param()` reference.

Which is that they can't see one. A parameter isn't resolved until the robot
is running and its store has been populated, so a parameterised option is
dropped here and its key is not required, leaving the schema's default in its
place. Anything reading these options has to answer for the default rather
than for the value the robot will actually run with.

# `module_and_options`

```elixir
@spec module_and_options(module() | {module(), keyword()}) :: {module(), keyword()}
```

Split a child spec into its module and options.

# `validate`

```elixir
@spec validate(
  module(),
  keyword()
) :: {:ok, keyword()} | {:error, Spark.Options.ValidationError.t()}
```

Validate options against the module's `options_schema/0`, applying defaults.

Parameterised options are dropped and their keys made optional, so a spec
that is only valid once its parameters resolve still validates here.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
