import type { ChartAnyPluginSignature, ChartPlugin } from "./plugin.js"; type IsAny = 0 extends 1 & T ? true : false; export type OptionalIfEmpty = keyof B extends never ? Partial> : IsAny extends true ? Partial> : Record; export type MergeSignaturesProperty = TSignatures extends readonly [plugin: infer P, ...otherPlugin: infer R] ? P extends ChartAnyPluginSignature ? P[TProperty] & MergeSignaturesProperty : {} : {}; export type ConvertSignaturesIntoPlugins = TSignatures extends readonly [signature: infer TSignature, ...otherSignatures: infer R] ? R extends readonly ChartAnyPluginSignature[] ? TSignature extends ChartAnyPluginSignature ? readonly [ChartPlugin, ...ConvertSignaturesIntoPlugins] : never : never : []; export {};