Skip to main content

Type Alias: OptionsMember<D>

type OptionsMember<D> = [SchemaOf<D>] extends [never] ? {
options?: never;
} : [undefined] extends [EntryOptions<SchemaOf<D>>] ? {
options?: EntryOptions<SchemaOf<D>>;
} : Record<string, never> extends EntryOptions<SchemaOf<D>> ? {
options?: EntryOptions<SchemaOf<D>>;
} : {
options: EntryOptions<SchemaOf<D>>;
};

Defined in: packages/config/src/types.ts:97

The options member of a config entry, per decisions c/d/e of driver-options-ergonomics/technical.md:

  • no optionsSchema => { options?: never } (passing one is a type error);
  • schema Input accepts undefined or is all-optional => { options?: … };
  • schema Input has a required field => { options: … }.

Type Parameters​

Type Parameter
D