-
Notifications
You must be signed in to change notification settings - Fork 66
/
index.d.ts
53 lines (47 loc) · 1.28 KB
/
index.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
49
50
51
52
53
import { ComponentId, Component } from "j-component";
export {
behavior,
Component,
ComponentJSON,
ComponentId,
RootComponent,
create as render,
} from "j-component";
export interface CompilerOptions {
maxBuffer?: number;
wxmlList?: Array<string>;
wxsList?: Array<string>;
}
export interface LoadOptions {
compiler?: "official" | "simulate";
compilerOptions?: CompilerOptions;
rootPath?: string;
less?: boolean;
usingComponents?: Object;
}
export function load<
TData extends WechatMiniprogram.Component.DataOption,
TProperty extends WechatMiniprogram.Component.PropertyOption,
TMethod extends WechatMiniprogram.Component.MethodOption
>(
options: WechatMiniprogram.Component.Options<TData, TProperty, TMethod> &
LoadOptions & {
id?: string;
tagName?: string;
template?: string;
}
): ComponentId<TData, TProperty, TMethod>;
export function load(componentPath: string, options?: LoadOptions): string;
export function load(
componentPath: string,
tagName: string,
options?: LoadOptions
): string;
export function match(dom: Node, html: string): boolean;
export function sleep(timeout: number): Promise<void>;
export function scroll(
component: Component<any, any, any>,
destOffset: number,
times?: number,
propName?: string
): void;