Skip to content

Commit

Permalink
fix(vue-jsx-runtime): type fix for [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
morlay committed Nov 25, 2024
1 parent 6bf647f commit 651d31d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion nodepkg/vue-jsx-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@innoai-tech/vue-jsx-runtime",
"version": "0.3.5",
"version": "0.3.6",
"monobundle": {
"exports": {
"./jsx-runtime": "./src/jsx-runtime.ts",
Expand Down
24 changes: 11 additions & 13 deletions nodepkg/vue-jsx-runtime/src/jsx-runtime.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import {
Fragment,
type NativeElements,
type ReservedProps,
type VNode,
type VNodeChild,
h,
isVNode,
} from "vue";
import { Fragment, h, isVNode, type NativeElements, type ReservedProps, type VNode, type VNodeChild } from "vue";

export { Fragment };

Expand Down Expand Up @@ -53,7 +45,7 @@ const wrapSlot = (children: any) => {

const pickPropsWithoutSlots = (
rawProps: Record<string, any>,
key?: string,
key?: string
): [any, any] => {
const { children, ...otherProps } = rawProps;

Expand Down Expand Up @@ -122,7 +114,8 @@ declare module "vue" {

declare global {
namespace JSX {
export interface Element extends VNode {}
export interface Element extends VNode {
}

export interface ElementClass {
$props: {};
Expand All @@ -138,11 +131,16 @@ declare global {
[name: string]: any;
}

export interface IntrinsicAttributes extends ReservedProps {}

// infer children type
export interface ElementChildrenAttribute {
$default: {};
}

export interface IntrinsicAttributes extends ReservedPropsWithElementChildren {
}

type ReservedPropsWithElementChildren = ReservedProps & {
$default?: VNodeChild | {};
}
}
}

0 comments on commit 651d31d

Please sign in to comment.