-
Notifications
You must be signed in to change notification settings - Fork 0
/
omusubi.d.ts
56 lines (36 loc) · 1.29 KB
/
omusubi.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
54
55
56
declare module 'omusubi-js' {
class RawHTMLTagFuncOutput {
strings: string[];
values: string[];
constructor(strings: string[], values: string[]);
}
export function defineComponent(tagname: string, options?: ElementDefinitionOptions): (wrapped: typeof Component) => void;
export function html(strings: string[], values: string[]): new () => RawHTMLTagFuncOutput;
export class Store<T extends object> {
constructor(element: unknown, state?: T);
update(state: T): void;
}
export class Component extends HTMLElement {
static styles: unknown[];
state: object;
dispatch(action: string, ...args: unknown[]): Promise<void>;
connectedCallback(): Promise<void>;
$ctx(contextId: string): ProviderComponent;
updatecontext(state: object): object;
setContext(template: Template): void;
render(props: object): new () => RawHTMLTagFuncOutput;
update(): Promise<void>;
}
export class ProviderComponent extends Component {
providerId: string;
setContext(template: Template): void;
}
class RenderPart {
constructor(hash: string, temp_hash: string, arg_hash: string);
remove(): void;
insertAfter(template: Template): void;
}
class Template extends RenderPart {
constructor(strings: string[]);
}
}