const GenericColorsTrait: <P1 extends Parser<any, any>, P2 extends Parser<any, any>>(
parseColorProp: P1,
parseColorsProp: P2,
) => (
props: {
color?: NonNullable<Parameters<P1>[0]>,
colors?: NonNullable<Parameters<P2>[0]>,
opacity?: number,
},
parsed: {
color?: NonNullable<ReturnType<P1>>,
colors?: NonNullable<ReturnType<P2>>,
},
) => void
packages / plot / src / traits.ts