Per-file JSX factories
TypeScript 2.8 adds support for a per-file configurable JSX factory name using @jsx dom
paragma.JSX factory can be configured for a compilation using —jsxFactory
(default is React.createElement
). With TypeScript 2.8 you can override this on a per-file-basis by adding a comment to the beginning of the file.
Example
/** @jsx dom */
import { dom } from "./renderer"
<h></h>
Generates:
var renderer_1 = require("./renderer");
renderer_1.dom("h", null);