Skip to content

Commit

Permalink
feat: support svelte types
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed May 20, 2023
1 parent bf8185e commit 58f2e89
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/svelte-selecto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svelte-selecto",
"version": "1.22.3",
"version": "1.22.4",
"description": "A Svelte Selecto Component that allows you to select elements in the drag area using the mouse or touch.",
"main": "./dist/selecto.cjs.js",
"module": "./dist/selecto.esm.js",
Expand Down
18 changes: 11 additions & 7 deletions packages/svelte-selecto/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import VanillaSelecto, { SelectoMethods, SelectoOptions } from "selecto";
import { SvelteComponentDev } from "svelte/internal";
import { MethodInterface } from "framework-utils";
/// <reference types="svelte" />
import { SvelteComponentTyped } from "svelte";
import { SelectoMethods, SelectoOptions, SelectoEvents } from "selecto";

export default class SelectoComponent<T={}> extends SvelteComponentDev {
$$prop_def: Partial<SelectoOptions> & T;
getInstance(): VanillaSelecto;
export type SvelteSelectoEvents = {
[key in keyof SelectoEvents]: CustomEvent<SelectoEvents[key]>;
}
export default interface SelectoComponent extends MethodInterface<SelectoMethods, VanillaSelecto, SelectoComponent> {
export default class SelectoComponent extends SvelteComponentTyped<
SelectoOptions,
SvelteSelectoEvents
> { }

export default interface SelectoComponent extends SelectoMethods {
}

export * from "selecto";

0 comments on commit 58f2e89

Please # to comment.