Skip to content

Split TimeScaleOptions sub types into smaller types #11185

@etimberg

Description

@etimberg

Feature Proposal

I am working on an integration where the existing code created the time options for the scale separately. Because there is no exposed type for this object, I had to use a work-around. It should be straightforward to create an intermediate type that is exposed

Workaround

import { type TimeScaleOptions } from 'chart.js'

const time: TimeScaleOptions['time'] = {
  unit: 'day'
}

Possible Implementation

Refactor https://github.com/chartjs/Chart.js/blob/master/src/types/index.d.ts#L3329-L3364 out into an exposed type

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions