This repository has been archived by the owner on May 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
svelte-shims.d.ts
48 lines (39 loc) · 1.85 KB
/
svelte-shims.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
declare module '*.svelte' {
export default class {
$$prop_def: any;
$$slot_def: any;
}
}
type AConstructorTypeOf<T> = new (...args:any[]) => T;
type SvelteAction<U extends any[]> = (node: HTMLElement, ...args:U) => {
update?: (...args:U) => void,
destroy?: () => void
}
type SvelteTransitionConfig = {
delay?: number,
duration?: number,
easing?: (t: number) => number,
css?: (t: number, u: number) => string,
tick?: (t: number, u: number) => void
}
type SvelteTransition<U extends any[]> = (node: Element, ...args:U) => SvelteTransitionConfig | (() => SvelteTransitionConfig)
type SvelteAnimation<U extends any[]> = (node: Element, move: { from: DOMRect, to: DOMRect}, ...args:U) => {
delay?: number,
duration?: number,
easing?: (t: number) => number,
css?: (t: number, u: number) => string,
tick?: (t: number, u: number) => void
}
type SvelteAllProps = { [index: string]: any }
type SvelteStore<T> = { subscribe: (run: (value:T) => any, invalidate?: any) => any }
declare var process: NodeJS.Process & { browser: boolean }
declare function __sveltets_ensureAnimation<U extends any[]>(animation: SvelteAnimation<U>, ...args: U): any;
declare function __sveltets_ensureAction<U extends any[]>(action: SvelteAction<U>, ...args: U): any;
declare function __sveltets_ensureTransition<U extends any[]>(transition: SvelteTransition<U>, ...args: U): any;
declare function __sveltets_ensureFunction(expression: (e: Event) => unknown ):any;
declare function __sveltets_ensureType<T>(type: AConstructorTypeOf<T>, el: T): any;
declare function __sveltets_instanceOf<T>(type: AConstructorTypeOf<T>): T;
declare function __sveltets_partial<T>(obj: T): Partial<T>;
declare function __sveltets_partial_with_any<T>(obj: T): Partial<T> & SvelteAllProps
declare function __sveltets_store_get<T=any>(store: SvelteStore<T>): T
declare function __sveltets_any(dummy: any): any;