Skip to content

v3.0.0-beta.13 breaks Bubble chart options typings #8621

@santam85

Description

@santam85

Declaring the following options:

public bubbleChartOptions: ChartOptions<'bubble'> = {
    scales: {
      x: {
        min: 0,
        max: 30,
        ticks: {}
      },
      y: {
        min: 0,
        max: 30,
        ticks: {}
      },
    }
  };

Throws a type error:

 Property 'scales' is incompatible with index signature.
    Type '{ x: { min: number; max: number; ticks: {}; }; y: { min: number; max: number; ticks: {}; }; }' is not assignable to type 'never'.

Expected Behavior

No error is thrown, the config should be valid

Possible Solution

I believe it's due to EmptyObject in

chartOptions: EmptyObject;

type: never takes precedence on the other options? If I use ChartOptions<'bubble'> as a type for the value above, it matches typings correctly, but I need to allow all options.

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions