Skip to content

TypeScript: xMin, xMax, yMin, yMax should accept undefined value as Scriptable options return value #921

Open
@tlserver

Description

@tlserver

The four options xMin, xMax, yMin, and yMax can accept an undefined value to indicate "growth to the chart boundary." Scriptable options for these four options also support an undefined value. However, TypeScript has incorrectly defined the types for these four options:

  xMax?: Scriptable<ScaleValue, PartialEventContext>,
  xMin?: Scriptable<ScaleValue, PartialEventContext>,
  yMax?: Scriptable<ScaleValue, PartialEventContext>,
  yMin?: Scriptable<ScaleValue, PartialEventContext>,

Using (_, __) => undefined should be a valid assignment, but currently, TypeScript raises a type error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    typesTypescript type changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions