-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mark localJsxFactory as used and type elision test
- Loading branch information
Showing
7 changed files
with
339 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
tests/baselines/reference/inlineJsxAndJsxFragPragmaOverridesCompilerOptions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
//// [tests/cases/conformance/jsx/inline/inlineJsxAndJsxFragPragmaOverridesCompilerOptions.tsx] //// | ||
|
||
//// [react.d.ts] | ||
declare global { | ||
namespace JSX { | ||
interface IntrinsicElements { | ||
[e: string]: any; | ||
} | ||
} | ||
} | ||
export function createElement(): void; | ||
export function Fragment(): void; | ||
|
||
//// [preact.d.ts] | ||
export function h(): void; | ||
export function Frag(): void; | ||
|
||
//// [snabbdom.d.ts] | ||
export function h(): void; | ||
|
||
//// [reacty.tsx] | ||
import {createElement, Fragment} from "./react"; | ||
<><span></span></> | ||
|
||
//// [preacty.tsx] | ||
/** | ||
* @jsx h | ||
* @jsxFrag Frag | ||
*/ | ||
import {h, Frag} from "./preact"; | ||
<><div></div></> | ||
|
||
//// [snabbdomy.tsx] | ||
/** | ||
* @jsx h | ||
* @jsxfrag null | ||
*/ | ||
import {h} from "./snabbdom"; | ||
<><div></div></> | ||
|
||
//// [mix-n-match.tsx] | ||
/* @jsx h */ | ||
/* @jsxFrag Fragment */ | ||
import {h} from "./preact"; | ||
import {Fragment} from "./react"; | ||
<><span></span></> | ||
|
||
//// [reacty.js] | ||
"use strict"; | ||
exports.__esModule = true; | ||
var react_1 = require("./react"); | ||
react_1.createElement(react_1.Fragment, null, | ||
react_1.createElement("span", null)); | ||
//// [preacty.js] | ||
"use strict"; | ||
exports.__esModule = true; | ||
/** | ||
* @jsx h | ||
* @jsxFrag Frag | ||
*/ | ||
var preact_1 = require("./preact"); | ||
preact_1.h(preact_1.Frag, null, | ||
preact_1.h("div", null)); | ||
//// [snabbdomy.js] | ||
"use strict"; | ||
exports.__esModule = true; | ||
/** | ||
* @jsx h | ||
* @jsxfrag null | ||
*/ | ||
var snabbdom_1 = require("./snabbdom"); | ||
snabbdom_1.h(null, null, | ||
snabbdom_1.h("div", null)); | ||
//// [mix-n-match.js] | ||
"use strict"; | ||
exports.__esModule = true; | ||
/* @jsx h */ | ||
/* @jsxFrag Fragment */ | ||
var preact_1 = require("./preact"); | ||
var react_1 = require("./react"); | ||
preact_1.h(react_1.Fragment, null, | ||
preact_1.h("span", null)); |
79 changes: 79 additions & 0 deletions
79
tests/baselines/reference/inlineJsxAndJsxFragPragmaOverridesCompilerOptions.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
=== tests/cases/conformance/jsx/inline/react.d.ts === | ||
declare global { | ||
>global : Symbol(global, Decl(react.d.ts, 0, 0)) | ||
|
||
namespace JSX { | ||
>JSX : Symbol(JSX, Decl(react.d.ts, 0, 16)) | ||
|
||
interface IntrinsicElements { | ||
>IntrinsicElements : Symbol(IntrinsicElements, Decl(react.d.ts, 1, 19)) | ||
|
||
[e: string]: any; | ||
>e : Symbol(e, Decl(react.d.ts, 3, 13)) | ||
} | ||
} | ||
} | ||
export function createElement(): void; | ||
>createElement : Symbol(createElement, Decl(react.d.ts, 6, 1)) | ||
|
||
export function Fragment(): void; | ||
>Fragment : Symbol(Fragment, Decl(react.d.ts, 7, 38)) | ||
|
||
=== tests/cases/conformance/jsx/inline/preact.d.ts === | ||
export function h(): void; | ||
>h : Symbol(h, Decl(preact.d.ts, 0, 0)) | ||
|
||
export function Frag(): void; | ||
>Frag : Symbol(Frag, Decl(preact.d.ts, 0, 26)) | ||
|
||
=== tests/cases/conformance/jsx/inline/snabbdom.d.ts === | ||
export function h(): void; | ||
>h : Symbol(h, Decl(snabbdom.d.ts, 0, 0)) | ||
|
||
=== tests/cases/conformance/jsx/inline/reacty.tsx === | ||
import {createElement, Fragment} from "./react"; | ||
>createElement : Symbol(createElement, Decl(reacty.tsx, 0, 8)) | ||
>Fragment : Symbol(Fragment, Decl(reacty.tsx, 0, 22)) | ||
|
||
<><span></span></> | ||
>span : Symbol(JSX.IntrinsicElements, Decl(react.d.ts, 1, 19)) | ||
>span : Symbol(JSX.IntrinsicElements, Decl(react.d.ts, 1, 19)) | ||
|
||
=== tests/cases/conformance/jsx/inline/preacty.tsx === | ||
/** | ||
* @jsx h | ||
* @jsxFrag Frag | ||
*/ | ||
import {h, Frag} from "./preact"; | ||
>h : Symbol(h, Decl(preacty.tsx, 4, 8)) | ||
>Frag : Symbol(Frag, Decl(preacty.tsx, 4, 10)) | ||
|
||
<><div></div></> | ||
>div : Symbol(JSX.IntrinsicElements, Decl(react.d.ts, 1, 19)) | ||
>div : Symbol(JSX.IntrinsicElements, Decl(react.d.ts, 1, 19)) | ||
|
||
=== tests/cases/conformance/jsx/inline/snabbdomy.tsx === | ||
/** | ||
* @jsx h | ||
* @jsxfrag null | ||
*/ | ||
import {h} from "./snabbdom"; | ||
>h : Symbol(h, Decl(snabbdomy.tsx, 4, 8)) | ||
|
||
<><div></div></> | ||
>div : Symbol(JSX.IntrinsicElements, Decl(react.d.ts, 1, 19)) | ||
>div : Symbol(JSX.IntrinsicElements, Decl(react.d.ts, 1, 19)) | ||
|
||
=== tests/cases/conformance/jsx/inline/mix-n-match.tsx === | ||
/* @jsx h */ | ||
/* @jsxFrag Fragment */ | ||
import {h} from "./preact"; | ||
>h : Symbol(h, Decl(mix-n-match.tsx, 2, 8)) | ||
|
||
import {Fragment} from "./react"; | ||
>Fragment : Symbol(Fragment, Decl(mix-n-match.tsx, 3, 8)) | ||
|
||
<><span></span></> | ||
>span : Symbol(JSX.IntrinsicElements, Decl(react.d.ts, 1, 19)) | ||
>span : Symbol(JSX.IntrinsicElements, Decl(react.d.ts, 1, 19)) | ||
|
83 changes: 83 additions & 0 deletions
83
tests/baselines/reference/inlineJsxAndJsxFragPragmaOverridesCompilerOptions.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
=== tests/cases/conformance/jsx/inline/react.d.ts === | ||
declare global { | ||
>global : any | ||
|
||
namespace JSX { | ||
interface IntrinsicElements { | ||
[e: string]: any; | ||
>e : string | ||
} | ||
} | ||
} | ||
export function createElement(): void; | ||
>createElement : () => void | ||
|
||
export function Fragment(): void; | ||
>Fragment : () => void | ||
|
||
=== tests/cases/conformance/jsx/inline/preact.d.ts === | ||
export function h(): void; | ||
>h : () => void | ||
|
||
export function Frag(): void; | ||
>Frag : () => void | ||
|
||
=== tests/cases/conformance/jsx/inline/snabbdom.d.ts === | ||
export function h(): void; | ||
>h : () => void | ||
|
||
=== tests/cases/conformance/jsx/inline/reacty.tsx === | ||
import {createElement, Fragment} from "./react"; | ||
>createElement : () => void | ||
>Fragment : () => void | ||
|
||
<><span></span></> | ||
><><span></span></> : error | ||
><span></span> : error | ||
>span : any | ||
>span : any | ||
|
||
=== tests/cases/conformance/jsx/inline/preacty.tsx === | ||
/** | ||
* @jsx h | ||
* @jsxFrag Frag | ||
*/ | ||
import {h, Frag} from "./preact"; | ||
>h : () => void | ||
>Frag : () => void | ||
|
||
<><div></div></> | ||
><><div></div></> : error | ||
><div></div> : error | ||
>div : any | ||
>div : any | ||
|
||
=== tests/cases/conformance/jsx/inline/snabbdomy.tsx === | ||
/** | ||
* @jsx h | ||
* @jsxfrag null | ||
*/ | ||
import {h} from "./snabbdom"; | ||
>h : () => void | ||
|
||
<><div></div></> | ||
><><div></div></> : error | ||
><div></div> : error | ||
>div : any | ||
>div : any | ||
|
||
=== tests/cases/conformance/jsx/inline/mix-n-match.tsx === | ||
/* @jsx h */ | ||
/* @jsxFrag Fragment */ | ||
import {h} from "./preact"; | ||
>h : () => void | ||
|
||
import {Fragment} from "./react"; | ||
>Fragment : () => void | ||
|
||
<><span></span></> | ||
><><span></span></> : error | ||
><span></span> : error | ||
>span : any | ||
>span : any | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.