Skip to content

Commit

Permalink
fix(types): fix modules imports
Browse files Browse the repository at this point in the history
fixes #6803
  • Loading branch information
nolimits4web committed Jul 3, 2023
1 parent 8cec86c commit a1b4cf6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 62 deletions.
5 changes: 4 additions & 1 deletion src/copy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@
},
"typesVersions": {
"*": {
"modules": [
"./types/modules/index.d.ts"
],
"element": [
"./swiper-element.d.ts"
],
Expand Down Expand Up @@ -201,4 +204,4 @@
"node": ">= 4.7.0"
},
"releaseDate": "July 3, 2023"
}
}
1 change: 1 addition & 0 deletions src/swiper-element.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-ignore
import { SwiperOptions, Swiper } from './types/index.d.ts';

declare const register: () => void;
Expand Down
59 changes: 3 additions & 56 deletions src/swiper.d.ts
Original file line number Diff line number Diff line change
@@ -1,58 +1,5 @@
import type Swiper from './types/swiper-class.d.ts';
import type { SwiperOptions } from './types/swiper-options.d.ts';
import type { SwiperModule } from './types/shared.d.ts';

declare const A11y: SwiperModule;
declare const Autoplay: SwiperModule;
declare const Controller: SwiperModule;
declare const EffectCoverflow: SwiperModule;
declare const EffectCube: SwiperModule;
declare const EffectFade: SwiperModule;
declare const EffectFlip: SwiperModule;
declare const EffectCreative: SwiperModule;
declare const EffectCards: SwiperModule;
declare const HashNavigation: SwiperModule;
declare const History: SwiperModule;
declare const Keyboard: SwiperModule;
declare const Lazy: SwiperModule;
declare const Mousewheel: SwiperModule;
declare const Navigation: SwiperModule;
declare const Pagination: SwiperModule;
declare const Parallax: SwiperModule;
declare const Scrollbar: SwiperModule;
declare const Thumbs: SwiperModule;
declare const Virtual: SwiperModule;
declare const Zoom: SwiperModule;
declare const FreeMode: SwiperModule;
declare const Grid: SwiperModule;
declare const Manipulation: SwiperModule;
// @ts-ignore
import Swiper from './types/swiper-class.d.ts';

export default Swiper;
export {
Swiper,
SwiperOptions,
A11y,
Autoplay,
Controller,
EffectCoverflow,
EffectCube,
EffectFade,
EffectFlip,
EffectCreative,
EffectCards,
HashNavigation,
History,
Keyboard,
Lazy,
Mousewheel,
Navigation,
Pagination,
Parallax,
Scrollbar,
Thumbs,
Virtual,
Zoom,
FreeMode,
Grid,
Manipulation,
};
export { Swiper };
11 changes: 6 additions & 5 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export type * from './shared.d.ts';
export type { default as Swiper } from './swiper-class.d.ts';
export type * from './swiper-events.d.ts';
export type * from './swiper-options.d.ts';
export type * from './modules/public-api.d.ts';
// @ts-nocheck
export * from './shared.d.ts';
export { default as Swiper } from './swiper-class.d.ts';
export * from './swiper-events.d.ts';
export * from './swiper-options.d.ts';
export * from './modules/public-api.d.ts';

0 comments on commit a1b4cf6

Please sign in to comment.