Skip to content

Export Typescript definition for what a Spec is #547

@wylieconlon

Description

@wylieconlon

For example, this definition is one that I have written to infer it externally, but it would be more convenient to have an official spec from the chart library itself.

type InferPropType<T> = T extends React.FunctionComponent<infer P> ? P : T;
type SeriesSpec = InferPropType<typeof LineSeries> &
  InferPropType<typeof BarSeries> &
  InferPropType<typeof AreaSeries>;

Metadata

Metadata

Assignees

No one assigned

    Labels

    :specsChart specifications related issuereleasedIssue released publicly

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions