tsx:add fragment support

This commit is contained in:
pengfei.zhou
2021-09-02 12:03:19 +08:00
committed by osborn
parent aeff0a06dc
commit 03633a7bea
11 changed files with 170 additions and 155 deletions

10
doric-js/index.d.ts vendored
View File

@@ -1399,11 +1399,13 @@ declare module 'doric/lib/src/util/flexbox' {
}
declare module 'doric/lib/src/util/jsx' {
import { View } from "doric/lib/src/ui/view";
import { Group, View } from "doric/lib/src/ui/view";
import { ClassType } from "doric/lib/src/util/types";
export const jsx: {
createElement: <T extends View>(constructor: ClassType<T>, config: Partial<T> | null, ...children: View[]) => T;
};
export namespace jsx {
function createElement<T extends View>(constructor: ClassType<T>, config: Partial<T> | null, ...children: View[]): T;
class Fragment extends Group {
}
}
global {
namespace JSX {
interface IntrinsicElements {