mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
reset soft with master for single commit (#38720)
This commit is contained in:
8
tests/cases/compiler/jsxFactoryAndJsxFragmentFactory.tsx
Normal file
8
tests/cases/compiler/jsxFactoryAndJsxFragmentFactory.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
//@jsx: react
|
||||
//@jsxFactory: h
|
||||
//@jsxFragmentFactory: Frag
|
||||
|
||||
declare var h: any;
|
||||
|
||||
<></>;
|
||||
<><span>1</span><><span>2.1</span><span>2.2</span></></>;
|
||||
@@ -0,0 +1,8 @@
|
||||
//@jsx: react
|
||||
//@jsxFactory: h
|
||||
//@jsxFragmentFactory: 234
|
||||
|
||||
declare var h: any;
|
||||
|
||||
<></>;
|
||||
<><span>1</span><><span>2.1</span><span>2.2</span></></>;
|
||||
@@ -0,0 +1,8 @@
|
||||
//@jsx: react
|
||||
//@jsxFactory: h
|
||||
//@jsxFragmentFactory: null
|
||||
|
||||
declare var h: any;
|
||||
|
||||
<></>;
|
||||
<><span>1</span><><span>2.1</span><span>2.2</span></></>;
|
||||
@@ -0,0 +1,26 @@
|
||||
// @jsx: react
|
||||
// @filename: renderer.d.ts
|
||||
declare global {
|
||||
namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
[e: string]: any;
|
||||
}
|
||||
}
|
||||
}
|
||||
export function h(): void;
|
||||
export function jsx(): void;
|
||||
export function Fragment(): void;
|
||||
|
||||
// @filename: preacty.tsx
|
||||
/**
|
||||
* @jsx h
|
||||
* @jsxFrag Fragment
|
||||
*/
|
||||
import {h, Fragment} from "./renderer";
|
||||
<><div></div></>
|
||||
|
||||
// @filename: snabbdomy.tsx
|
||||
/* @jsx jsx */
|
||||
/* @jsxfrag null */
|
||||
import {jsx} from "./renderer";
|
||||
<><span></span></>
|
||||
@@ -0,0 +1,48 @@
|
||||
// @jsx: react
|
||||
// @jsxFactory: createElement
|
||||
// @jsxFragmentFactory: Fragment
|
||||
|
||||
// @filename: react.d.ts
|
||||
declare global {
|
||||
namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
[e: string]: any;
|
||||
}
|
||||
}
|
||||
}
|
||||
export function createElement(): void;
|
||||
export function Fragment(): void;
|
||||
|
||||
// @filename: preact.d.ts
|
||||
export function h(): void;
|
||||
export function Frag(): void;
|
||||
|
||||
// @filename: snabbdom.d.ts
|
||||
export function h(): void;
|
||||
|
||||
// @filename: reacty.tsx
|
||||
import {createElement, Fragment} from "./react";
|
||||
<><span></span></>
|
||||
|
||||
// @filename: preacty.tsx
|
||||
/**
|
||||
* @jsx h
|
||||
* @jsxFrag Frag
|
||||
*/
|
||||
import {h, Frag} from "./preact";
|
||||
<><div></div></>
|
||||
|
||||
// @filename: snabbdomy.tsx
|
||||
/**
|
||||
* @jsx h
|
||||
* @jsxfrag null
|
||||
*/
|
||||
import {h} from "./snabbdom";
|
||||
<><div></div></>
|
||||
|
||||
// @filename: mix-n-match.tsx
|
||||
/* @jsx h */
|
||||
/* @jsxFrag Fragment */
|
||||
import {h} from "./preact";
|
||||
import {Fragment} from "./react";
|
||||
<><span></span></>
|
||||
Reference in New Issue
Block a user