Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions types/JSX.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,22 @@ type Booleanish = boolean | 'true' | 'false'
// Nullstack Elements
// ----------------------------------------------------------------------

export interface Attributes {
export interface Attributes<HTMLElementType> {
html?: string
source?: object
bind?: any
debounce?: number
ref?: any
ref?: HTMLElementType | ((context?: Partial<NullstackClientContext>) => void)
'data-'?: any
children?: NullstackNode
route?: string
persistent?: boolean
[key: string]: any
}

export interface NullstackAttributes extends Attributes {}
export interface NullstackAttributes<T> extends Attributes<T> {}

export interface ClassAttributes extends Attributes {
export interface ClassAttributes<T> extends Attributes<T> {
key?: string
}

Expand Down Expand Up @@ -218,9 +218,9 @@ type WheelEventHandler<T = Element> = EventHandler<WheelEvent<T>>

type DetailedHTMLProps<E extends HTMLAttributes<T>, T> = E

export interface SVGProps<T> extends SVGAttributes<T>, ClassAttributes {}
export interface SVGProps<T> extends SVGAttributes<T>, ClassAttributes<T> {}

export interface DOMAttributes<T> extends Attributes {
export interface DOMAttributes<T> extends Attributes<T> {
// Focus Events
onfocus?: FocusEventHandler<T>
onblur?: FocusEventHandler<T>
Expand Down Expand Up @@ -1243,8 +1243,8 @@ declare global {
namespace JSX {
type Element = NullstackNode

type IntrinsicAttributes = NullstackAttributes
type IntrinsicClassAttributes = ClassAttributes
type IntrinsicAttributes = NullstackAttributes<unknown>
type IntrinsicClassAttributes = ClassAttributes<unknown>

interface AllElements {
// HTML
Expand Down