Browse Source

refactor: 完善下jsx的类型

es6
Kira 3 years ago
parent
commit
5b649661e3
  1. 6
      typescript/shims-tsx.ts

6
typescript/shims-tsx.ts

@ -4,9 +4,9 @@ interface UIProps {
width: number | string;
height: number | string;
top: number;
left: number;
left: number | JSX.Element;
bottom: number;
right: number;
right: number | JSX.Element;
rgap: number;
lgap: number;
tgap: number;
@ -64,7 +64,7 @@ interface ElementClassProps<T> extends UIProps {
}
type Widget = import('./index').Widget;
type Props<T extends Widget = any> = Partial<ElementClassProps<T> & AdditionalProps>;
type Props<T extends Widget = any> = Partial<ElementClassProps<T> & AdditionalProps & Record<string, any>>;
declare namespace JSX {
interface Element extends Props {

Loading…
Cancel
Save