Type Alias UpgradeToBindingsProps<PropsT, PassThruKeyT>

UpgradeToBindingsProps<PropsT, PassThruKeyT>: {
    [KeyT in keyof PropsT]: KeyT extends PassThruKeyT
        ? PropsT[KeyT]
        : ReadonlyBinding extends PropsT[KeyT]
            ? never
            : undefined extends PropsT[KeyT]
                ? PropsT[KeyT] | ReadonlyBinding<PropsT[KeyT] | undefined>
                : PropsT[KeyT] | ReadonlyBinding<PropsT[KeyT]>
}

Type Parameters

  • PropsT extends Record<string, any>
  • PassThruKeyT extends keyof PropsT & string = never