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

Loading…
Cancel
Save