Add UIFragmentRecord type

This commit is contained in:
Tony Garnock-Jones 2022-05-03 16:23:12 +02:00
parent 6d85d220f7
commit 61e8f38815
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import { QuasiValue as Q } from "@syndicate-lang/core";
import * as P from "./protocol";
export * from "./protocol";
export type UIFragmentRecord = ReturnType<typeof P.UIFragment>;
import { HtmlFragments } from "./html";
export * from "./html";
@ -501,7 +502,7 @@ export class Anchor {
return new Anchor({ fragmentId: this.fragmentId + '__' + extn });
}
html(selector: string, html: HtmlFragments | Array<ChildNode>, orderBy: NodeOrderKey = ''): ReturnType<typeof P.UIFragment> {
html(selector: string, html: HtmlFragments | Array<ChildNode>, orderBy: NodeOrderKey = ''): UIFragmentRecord {
if (!Array.isArray(html)) {
html = html.nodes();
}