+
Snabbdom
+ and tsx
+ {['work', 'like', 'a', 'charm!'].map(part =>
)}
+ {'ππΊπ'}
+
+ );
+
+ assert.equal(JSON.stringify(vnode), JSON.stringify({
+ sel: 'div',
+ data: {},
+ children: [
+ {sel: 'a', data: {attrs: {href: 'https://github.com/snabbdom/snabbdom'}}, text: 'Snabbdom'},
+ {text: 'and tsx'},
+ {sel: 'span', data: {}, text: 'work'},
+ {sel: 'span', data: {}, text: 'like'},
+ {sel: 'span', data: {}, text: 'a'},
+ {sel: 'span', data: {}, text: 'charm!'},
+ {text: 'ππΊπ'},
+ ],
+ }));
+ })
+ });
+});
diff --git a/tsconfig.json b/tsconfig.json
index ed1e9b5..8c2372f 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -7,6 +7,8 @@
"declaration": true,
"removeComments": false,
"noUnusedLocals": true,
+ "jsx": "react",
+ "jsxFactory": "jsx",
"lib": [
"dom",
"es5",
@@ -27,6 +29,8 @@
"src/htmldomapi.ts",
"src/hooks.ts",
"src/is.ts",
+ "src/jsx-global.d.ts",
+ "src/jsx.ts",
"src/snabbdom.bundle.ts",
"src/snabbdom.ts",
"src/thunk.ts",