Skip to content

Commit

Permalink
Allow undefined for partial properties
Browse files Browse the repository at this point in the history
  • Loading branch information
ryota-ka committed Apr 18, 2024
1 parent b0a906c commit 81724c7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,45 +106,45 @@ export declare namespace Internal {
}

type CommonProps = {
$hook?: Hooks;
$key?: Key;
$hook?: Hooks | undefined;
$key?: Key | undefined;
/**
* @deprecated Use `$attrs` attribute instead.
*/
attrs?: Attrs;
attrs?: Attrs | undefined;
children?: Snabbdom.Node;
/**
* @deprecated Use `$class` attribute instead.
*/
class?: Classes;
class?: Classes | undefined;
/**
* @deprecated Use `$dataset` attribute instead.
*/
data?: Dataset;
data?: Dataset | undefined;
/**
* @deprecated Use `$dataset` attribute instead.
*/
dataset?: Dataset;
dataset?: Dataset | undefined;
/**
* @deprecated Use `$hook` attribute instead.
*/
hook?: Hooks;
hook?: Hooks | undefined;
/**
* @deprecated Use `$key` attribute instead.
*/
key?: Key;
key?: Key | undefined;
/**
* @deprecated Use `on*` attributes instead.
*/
on?: On;
on?: On | undefined;
/**
* @deprecated Pass properties as JSX attributes instead.
*/
props?: Props;
props?: Props | undefined;
/**
* @deprecated Use `$style` instead.
*/
style?: Style;
style?: Style | undefined;
};

type Modularize<Modules extends Record<string, any>> = {
Expand Down Expand Up @@ -924,7 +924,7 @@ export declare namespace JSX {
type ElementType = keyof IntrinsicElements | ((props: any, children?: Snabbdom.Node) => Snabbdom.VNodeChildElement);

type IntrinsicAttributes = {
$key?: Key;
$key?: Key | undefined;
children?: unknown;
};

Expand Down

0 comments on commit 81724c7

Please sign in to comment.