File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import camelCase from 'camelcase'
7
7
import Prism from ' prismjs'
8
8
9
9
// Hoist to `window` for debug
10
+ // @ts-ignore
10
11
window .toast = toast
11
12
12
13
let selected
@@ -19,6 +20,7 @@ const handleClick = (btn) => {
19
20
selected = btn .name
20
21
code = btn .code
21
22
btn .run ()
23
+ // @ts-ignore
22
24
window .gtag (' event' , ' toast' , { event_label: btn .name })
23
25
}
24
26
Original file line number Diff line number Diff line change 1
1
{
2
2
"compilerOptions" : {
3
- "baseUrl" : " ."
3
+ "baseUrl" : " ." ,
4
+ "allowJs" : true ,
5
+ "checkJs" : true ,
6
+ "strict" : false
4
7
},
5
8
"include" : [" src/index.d.ts" ]
6
9
}
Original file line number Diff line number Diff line change 1
1
// index.d.ts
2
2
import type { SvelteComponent } from 'svelte'
3
3
import type { FlyParams } from 'svelte/types/runtime/transition/index'
4
+ import type { Subscriber , Unsubscriber } from 'svelte/types/runtime/store/index'
4
5
5
6
declare module '@zerodevx/svelte-toast'
6
7
@@ -53,4 +54,5 @@ declare namespace toast {
53
54
export function pop ( arg ?: any ) : void
54
55
export function set ( id : number , options ?: SvelteToastOptions ) : void
55
56
export function set ( options : SvelteToastOptions ) : void
57
+ export function subscribe ( run : Subscriber ) : Unsubscriber
56
58
}
You can’t perform that action at this time.
0 commit comments