Skip to content

[FEAT] Typescript support #23

@SalahAdDin

Description

@SalahAdDin

Is your proposal related to a problem?

We want to write our stories using Typescript:

Image

Describe the solution you’d like

Adding type support for the package or write the package in Typescript itself.

Describe alternatives you’ve considered

Disabling typescript for this component. We are type it as a solution, stories/typings.d.ts:

declare module 'storybook-django/src/react' {
  import { ComponentType } from 'react';

  type PatternProps = {
    template: string;
    context: Record<
      string,
      string | number | boolean | object | null | undefined
    >;
  };
  export const Pattern: ComponentType<PatternProps>;
}

Additional context

(Write your answer here.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions