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?: string | string[],
colors?: string[],
},
) => void
packages / 2d-plot / src / traits.ts