Skip to content

Type issue for apiPath in ts files #20

@SalahAdDin

Description

@SalahAdDin

Describe the bug

Writing the middleware in a typescript file leads to this issue:
Image

Which terms did you search for in the documentation and issue tracker?

Here is the typing issue: https://github.com/torchbox/storybook-django/blob/926408761bc891e2cb6607308b5206cc25163a33/src/middleware.js#L7C4-L7C108

Environment

macOS Sequoia 15.7.3 (24G419) arm64
Zen Browser 1.17.15b (Firefox 146.0.1) (aarch64)
Node v20.19.3
"typescript": "^5.9.2",

Steps to reproduce

  1. Setup Storybook with Django.
  2. Write the middle-ware file as typescript.
  3. Write the middlew-are as documentation states.

Expected behavior

No TS issues.

Actual behavior

Linting issue: Image

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions