Skip to content

[bug]: Type-only imports break build with "verbatimModuleSyntax": true #8499

@i3months

Description

@i3months

Describe the bug

When using "verbatimModuleSyntax": true in tsconfig.json,
the registry contains type-only imports (e.g. SliderProps, ButtonProps, etc.)
that are not declared with the type keyword. Under verbatim module syntax,
this causes build-time errors such as:

TS1487: The import declaration should use 'import type' when 'verbatimModuleSyntax' is enabled.

I’ve prepared a PR that updates all affected imports to use explicit
import type { ... } syntax under apps/www/registry/**/ui and
apps/v4/app/examples/playground/components/**.

This improves compatibility with strict TypeScript configurations and ensures
cleaner separation between type and value imports.

  • No runtime behavior is changed.
  • Verified pnpm build:registry runs successfully.
  • Confirmed all components still build and render correctly.

Affected component/components

apps/v4/app/examples/playground/components/** apps/www/registry/new-york-v4/ui/**

How to reproduce

  1. In your local setup, open tsconfig.json.
  2. Add "verbatimModuleSyntax": true to the compiler options.
  3. Run pnpm build:registry (or build the www workspace).
  4. Observe build errors

Codesandbox/StackBlitz link

No response

Logs

System Info

TypeScript: 5.x
pnpm: 8.x
Node: LTS
OS: macOS
tsconfig: "verbatimModuleSyntax": true

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

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