-
Notifications
You must be signed in to change notification settings - Fork 9
feat: Use our own native DOM types in JSX #1981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
82e5fb4 to
8f05c24
Compare
| export interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> { | ||
| // CT extensions | ||
| "onClick"?: CellLike<HandlerEvent<unknown>>; | ||
| "children"?: RenderNode | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this always be an array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type RenderNode = RenderNode[] | .. so this suffices, I think in the html renderer we make it an array if not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! obviously a lot to eventually carefully trim down, but this will last us for a bit, thank you!
3c3a3c6 to
9ff6045
Compare
RenderNodewithundefinedandOpaque<any>CellLiketo includeOpaqueRefMethodsandOpaquenamespace CTDOM, defining valid native DOM elements and attributes, similar to what Preact/React provides. Native events elided.jsx.d.tswith our own Elements.onClickcell-based handler. Can extend more as needed.[elemName: string]: any;has been disabled for now. Can re-enable to allow undefined elements as needed.Summary by cubic
Defined CTDOM types directly in jsx.d.ts to replace TypeScript’s DOM lib, adding strong typings for native HTML tags and CT custom elements in the sandboxed runtime. Also extended JSX wrappers and RenderNode to support Opaque and undefined.
New Features
Refactors
Written for commit b536562. Summary will update automatically on new commits.