-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(svelte): add Svelte components typings
- Loading branch information
1 parent
7a72f5d
commit 5a64bdc
Showing
5 changed files
with
74 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { SvelteComponentTyped } from 'svelte'; | ||
import { SwiperOptions, Swiper as SwiperClass } from '../types/'; | ||
|
||
// @ts-ignore | ||
interface SwiperProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap['div']> {} | ||
interface SwiperProps extends SwiperOptions {} | ||
|
||
// @ts-ignore | ||
interface SwiperSlideProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap['div']> { | ||
/** | ||
* Enables additional wrapper required for zoom mode | ||
* | ||
* @default false | ||
*/ | ||
zoom?: boolean; | ||
|
||
/** | ||
* Slide's index in slides array/collection | ||
* | ||
* @default false | ||
*/ | ||
virtualIndex?: number; | ||
} | ||
|
||
declare class Swiper extends SvelteComponentTyped< | ||
SwiperProps, | ||
{ | ||
swiper: CustomEvent<void>; | ||
// CORE_EVENTS | ||
// MODULES_EVENTS | ||
}, | ||
{ | ||
default: {}; | ||
'container-start': {}; | ||
'wrapper-start': {}; | ||
'wrapper-end': {}; | ||
'container-end': {}; | ||
} | ||
> {} | ||
|
||
declare class SwiperSlide extends SvelteComponentTyped< | ||
SwiperSlideProps, | ||
{}, | ||
{ | ||
default: {}; | ||
} | ||
> {} | ||
|
||
export { Swiper, SwiperSlide }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters