embeds + decentralized element definition

This commit is contained in:
MapleLeaf
2021-12-25 03:11:01 -06:00
parent 18bcf4828c
commit 6f3c97812c
12 changed files with 231 additions and 116 deletions

5
src.new/jsx.d.ts vendored
View File

@@ -1,12 +1,13 @@
import type { ReactNode } from "react"
import type { Node } from "./node"
import type { Node } from "./node.js"
declare global {
namespace JSX {
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
interface IntrinsicElements {
"reacord-element": {
createNode: () => Node
props: Record<string, unknown>
createNode: (props: Record<string, unknown>) => Node
children?: ReactNode
}
}