mirror of
https://github.com/MercuryWorkshop/dreamlandjs.git
synced 2025-05-16 15:40:01 -04:00
add code
This commit is contained in:
commit
26f12e0a8f
12 changed files with 972 additions and 0 deletions
23
AliceJS.d.ts
vendored
Normal file
23
AliceJS.d.ts
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
declare namespace JSX {
|
||||
export type IntrinsicElements = { [index: string]: any };
|
||||
}
|
||||
|
||||
declare function h(
|
||||
type: string,
|
||||
props: { [index: string]: any } | null,
|
||||
...children: (HTMLElement | string)[]
|
||||
): Node;
|
||||
|
||||
type AliceJSReferenceSink = { readonly __symbol: unique symbol };
|
||||
|
||||
declare function use(sink: any, mapping?: (...args: any[]) => any): AliceJSReferenceSink;
|
||||
|
||||
type Stateful<T> = T & { readonly symbol: unique symbol };
|
||||
|
||||
|
||||
declare function stateful<T>(target: T): Stateful<T>;
|
||||
|
||||
declare function handle(references: AliceJSReferenceSink, callback: (value: any) => void): void;
|
||||
|
||||
declare function css(strings: TemplateStringsArray, ...values: any): string;
|
||||
declare var styled: { new: typeof css };
|
Loading…
Add table
Add a link
Reference in a new issue