Validates typed module options: evaluates to true for a valid module, otherwise to an
unconstructible branded type naming the violation. Checks that activate's environment only
uses declared requires, that its error channel extends Error, and that its return
exactly covers the declared provides. Options with no capability declarations are a
dependency-mode root and validate as true (the runtime normalizer classifies them).
Applied on addModule's return type (not intersected with the parameter): inference
of Opts from an options object containing inline generator activates fails when the
parameter is an intersection with a conditional over Opts, but succeeds for a naked
Opts parameter. An invalid module surfaces as a non-callable branded return, which the
.pipe(...) site rejects with the brand's message.
Validates typed module options: evaluates to
truefor a valid module, otherwise to an unconstructible branded type naming the violation. Checks that activate's environment only uses declaredrequires, that its error channel extendsError, and that its return exactly covers the declaredprovides. Options with no capability declarations are a dependency-mode root and validate astrue(the runtime normalizer classifies them).Applied on addModule's return type (not intersected with the parameter): inference of
Optsfrom an options object containing inline generator activates fails when the parameter is an intersection with a conditional overOpts, but succeeds for a nakedOptsparameter. An invalid module surfaces as a non-callable branded return, which the.pipe(...)site rejects with the brand's message.