Skip to content

Commit 2c90c27

Browse files
committed
more types
1 parent 4427a98 commit 2c90c27

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/svelte/types/index.d.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2549,8 +2549,19 @@ declare module 'svelte/events' {
25492549
}
25502550

25512551
declare module 'svelte/toolbar' {
2552+
export interface Tool {
2553+
name: string;
2554+
icon: string; // url or svg
2555+
activate:()=>void;
2556+
deactivate:()=>void;
2557+
keyCombo?: string;
2558+
disabled?: boolean;
2559+
}
2560+
type ToolFn = ()=>Tool
2561+
25522562
export interface Config {
2553-
position: 'top'|'bottom'
2563+
position?: 'top' | 'bottom';
2564+
tools?: (Tool | ToolFn)[];
25542565
}
25552566
export function configure(options: Partial<Config>): void;
25562567

0 commit comments

Comments
 (0)