Files
klz-cables.com/.pnpm-store/v10/files/28/d153789eff71033463177cece3b4ab24380e36f3f67aa76caf2f561e2f0dd7e15dc082afa1e61c698885073cc0bccc5e83e3bc55e8c9fb5d1afae1dd7900ee
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

18 lines
758 B
Plaintext

/**
* This utility type forms an object type of `Options` by taking values from
* `OverrideOptions`. If a value is not defined in `OverrideOptions`, the
* utility type takes the value from `DefaultOptions`.
*
* The utility type intentionally restricts:
* - `Options` to be required to know the object type form.
* - `OverrideOptions` to be partial to make empty object assignable to it.
* - `DefaultOptions` to be required to have fallback values for every property.
*/
export type CreateTypeOptions<
Options extends Required<Options>,
OverrideOptions extends Partial<Options>,
DefaultOptions extends Required<Options>,
> = {
[Key in keyof Options]: OverrideOptions[Key] extends Options[Key] ? OverrideOptions[Key] : DefaultOptions[Key];
};