Skip to content

Commit

Permalink
fix: bundle JSX types
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjavi committed Sep 5, 2024
1 parent e264f0d commit 3b93baf
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jynxs",
"version": "0.2.0",
"version": "0.2.1",
"description": "Lightweight React-like JSX runtime with the basics.",
"keywords": [
"react",
Expand Down
23 changes: 21 additions & 2 deletions src/runtime/jsx-runtime.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
import { shallowEquals } from './utils'

export declare namespace JSX {
// type HTMLAttributes = Record<string, JSXNode | undefined> & JSXChildren
type HTMLAttributes = Record<string, any | undefined>

interface IntrinsicElements {
[elemName: string]: any
}

type SyncElement = {
type: string | Function
props: {
children?: Element | Element[]
[key: string]: any
}
}

type Element = SyncElement | Promise<SyncElement>

type ElementType = string | ((props: any) => Element | Promise<Element>)
}

type Props = { [key: string]: any }
type JSXRef =
| {
current: HTMLElement | null
}
| ((element: HTMLElement) => void)

// type JSXNode = string | number | null | undefined | JSXElement | JSXNode[];

type JSXElement = {
type: string | Function
props: Props
Expand Down
19 changes: 0 additions & 19 deletions src/runtime/types.d.ts

This file was deleted.

0 comments on commit 3b93baf

Please sign in to comment.