* Add support for per-file jsx pragmas * Add error for using jsx factory pragma with fragments * More tests, use different regex class for pragma capture * Unify all pragma parsing machinery
19 lines
No EOL
445 B
TypeScript
19 lines
No EOL
445 B
TypeScript
// @jsx: react
|
|
// @filename: renderer.d.ts
|
|
declare global {
|
|
namespace JSX {
|
|
interface IntrinsicElements {
|
|
[e: string]: any;
|
|
}
|
|
}
|
|
}
|
|
export function dom(): void;
|
|
export function createElement(): void;
|
|
// @filename: reacty.tsx
|
|
/** @jsx React.createElement */
|
|
import * as React from "./renderer";
|
|
<><h></h></>
|
|
// @filename: index.tsx
|
|
/** @jsx dom */
|
|
import { dom } from "./renderer";
|
|
<><h></h></> |