diff options
author | 2021-03-24 11:45:38 -0400 | |
---|---|---|
committer | 2021-03-24 11:45:38 -0400 | |
commit | 3c24faa8cab428b17ba2f8e083f5296b1b931fe1 (patch) | |
tree | 940e2b6b68c2d7e895802fd451c7777f60c56eb6 /src/frontend/h.ts | |
parent | 5c1cd5b1da446f51e535030072756126f7b038d7 (diff) | |
download | astro-3c24faa8cab428b17ba2f8e083f5296b1b931fe1.tar.gz astro-3c24faa8cab428b17ba2f8e083f5296b1b931fe1.tar.zst astro-3c24faa8cab428b17ba2f8e083f5296b1b931fe1.zip |
hmx ☞ astro (#22)
This changes all hmx files to astro files and updates all code to not reference hmx any more.
Diffstat (limited to 'src/frontend/h.ts')
-rw-r--r-- | src/frontend/h.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/frontend/h.ts b/src/frontend/h.ts index 77ecf857b..cd94583f8 100644 --- a/src/frontend/h.ts +++ b/src/frontend/h.ts @@ -1,7 +1,7 @@ export type HProps = Record<string, string> | null | undefined; export type HChild = string | undefined | (() => string); -export type HMXComponent = (props: HProps, ...children: Array<HChild>) => string; -export type HTag = string | HMXComponent; +export type AstroComponent = (props: HProps, ...children: Array<HChild>) => string; +export type HTag = string | AstroComponent; const voidTags = new Set(['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']); @@ -41,7 +41,7 @@ function* _h(tag: string, attrs: HProps, children: Array<HChild>) { export async function h(tag: HTag, attrs: HProps, ...pChildren: Array<Promise<HChild>>) { const children = await Promise.all(pChildren.flat(Infinity)); if (typeof tag === 'function') { - // We assume it's an hmx component + // We assume it's an astro component return tag(attrs, ...children); } |