nolimits4web / swiper

Most modern mobile touch slider with hardware accelerated transitions

Home Page:https://swiperjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swiper 11.1.2 TypeScript issue

Kbdq opened this issue · comments

commented

Check that this is really a bug

  • I confirm

Reproduction link

not necessary

Bug description

I'm using Swiper in Angular v 17 project with TypeScript 5.3.3. After update Swiper to version 11.1.2 it results in the following error:

Error: node_modules/.pnpm/swiper@11.1.2/node_modules/swiper/types/shared.d.ts:1:24 - error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './index.js' instead?

import { Swiper } from './index.d.ts';

The solution is to remove 'd.ts', in other words, just replace it with

import { Swiper } from './index';

or to rollback back to 11.1.1 - it works normal

Expected Behavior

No response

Actual Behavior

No response

Swiper version

11.1.2

Platform/Target and Browser Versions

no matter

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR

We're encountering the same error today, and it's causing a blocker for us. Could you please assist us as soon as possible? Thanks in advance.