Open hmnd opened 2 years ago
Here are the types that I use. You can include this in you own types declaration file
declare module 'svelte-keyboard' {
import { SvelteComponent } from "svelte";
export type KeyboardProps = {
custom?: Array<{ row: number, value: string }> | null;
localizationLayout?: 'qwerty' | 'azerty';
layout?: 'standard' | 'crossword' | 'wordle';
keyClass?: {
[k: string]: string
};
noSwap?: string[]
};
export type KeyboardEvents = {
keydown: CustomEvent<string>;
[evt: string]: CustomEvent<any>;
};
export type KeyboardSlots = {};
export default class Keyboard extends SvelteComponent<
KeyboardProps,
KeyboardEvents,
KeyboardSlots
> {
}
}
Would be awesome if this package could include proper Typescript types. Might tackle this in a PR myself if I have some time.