-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
20 additions
and
32 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
31 changes: 9 additions & 22 deletions
31
packages/svelte-infinite-viewer/src/svelte-infinite-viewer/index.d.ts
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 |
---|---|---|
@@ -1,28 +1,15 @@ | ||
import VanillaInfiniteViewer, { InfiniteViewerMethods } from "infinite-viewer"; | ||
import { SvelteComponentDev } from "svelte/internal"; | ||
import VanillaInfiniteViewer, { | ||
InfiniteViewerOptions, | ||
InfiniteViewerMethods, | ||
} from "infinite-viewer"; | ||
import { MethodInterface } from "framework-utils"; | ||
|
||
|
||
interface ComponentOptions { | ||
target: HTMLElement; | ||
anchor?: HTMLElement | null; | ||
props?: {}; | ||
hydrate?: boolean; | ||
intro?: boolean; | ||
export default class InfiniteViewerComponent<T={}> extends SvelteComponentDev { | ||
$$prop_def: InfiniteViewerOptions & T; | ||
getInstance(): VanillaInfiniteViewer; | ||
} | ||
|
||
interface InfiniteViewerComponent extends MethodInterface<InfiniteViewerMethods, VanillaInfiniteViewer, InfiniteViewerComponent> { | ||
new(options: ComponentOptions): any; | ||
// client-side methods | ||
$set(props: {}): void; | ||
$on(event: string, callback: (event: CustomEvent) => void): void; | ||
$destroy(): void; | ||
// server-side methods | ||
render(props?: {}): { | ||
html: string; | ||
css: { code: string; map: string | null }; | ||
head?: string; | ||
}; | ||
export default interface InfiniteViewerComponent extends MethodInterface<InfiniteViewerMethods, VanillaInfiniteViewer, InfiniteViewerComponent> { | ||
} | ||
|
||
export default InfiniteViewerComponent; | ||
export * from "infinite-viewer"; |
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