mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-27 04:48:33 -05:00
CR feedback
This commit is contained in:
29
tests/baselines/reference/tsxReactEmit5.js
Normal file
29
tests/baselines/reference/tsxReactEmit5.js
Normal file
@@ -0,0 +1,29 @@
|
||||
//// [tests/cases/conformance/jsx/tsxReactEmit5.tsx] ////
|
||||
|
||||
//// [file.tsx]
|
||||
|
||||
declare module JSX {
|
||||
interface Element { }
|
||||
interface IntrinsicElements {
|
||||
[s: string]: any;
|
||||
}
|
||||
}
|
||||
|
||||
//// [test.d.ts]
|
||||
export var React;
|
||||
|
||||
//// [react-consumer.tsx]
|
||||
import {React} from "./test";
|
||||
// Should emit test_1.React.createElement
|
||||
// and React.__spread
|
||||
var foo;
|
||||
var spread1 = <div x='' {...foo} y='' />;
|
||||
|
||||
|
||||
//// [file.js]
|
||||
//// [react-consumer.js]
|
||||
var test_1 = require("./test");
|
||||
// Should emit test_1.React.createElement
|
||||
// and React.__spread
|
||||
var foo;
|
||||
var spread1 = test_1.React.createElement("div", test_1.React.__spread({x: ''}, foo, {y: ''}));
|
||||
35
tests/baselines/reference/tsxReactEmit5.symbols
Normal file
35
tests/baselines/reference/tsxReactEmit5.symbols
Normal file
@@ -0,0 +1,35 @@
|
||||
=== tests/cases/conformance/jsx/file.tsx ===
|
||||
|
||||
declare module JSX {
|
||||
>JSX : Symbol(JSX, Decl(file.tsx, 0, 0))
|
||||
|
||||
interface Element { }
|
||||
>Element : Symbol(Element, Decl(file.tsx, 1, 20))
|
||||
|
||||
interface IntrinsicElements {
|
||||
>IntrinsicElements : Symbol(IntrinsicElements, Decl(file.tsx, 2, 22))
|
||||
|
||||
[s: string]: any;
|
||||
>s : Symbol(s, Decl(file.tsx, 4, 3))
|
||||
}
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/jsx/test.d.ts ===
|
||||
export var React;
|
||||
>React : Symbol(React, Decl(test.d.ts, 0, 10))
|
||||
|
||||
=== tests/cases/conformance/jsx/react-consumer.tsx ===
|
||||
import {React} from "./test";
|
||||
>React : Symbol(React, Decl(react-consumer.tsx, 0, 8))
|
||||
|
||||
// Should emit test_1.React.createElement
|
||||
// and React.__spread
|
||||
var foo;
|
||||
>foo : Symbol(foo, Decl(react-consumer.tsx, 3, 3))
|
||||
|
||||
var spread1 = <div x='' {...foo} y='' />;
|
||||
>spread1 : Symbol(spread1, Decl(react-consumer.tsx, 4, 3))
|
||||
>div : Symbol(JSX.IntrinsicElements, Decl(file.tsx, 2, 22))
|
||||
>x : Symbol(unknown)
|
||||
>y : Symbol(unknown)
|
||||
|
||||
37
tests/baselines/reference/tsxReactEmit5.types
Normal file
37
tests/baselines/reference/tsxReactEmit5.types
Normal file
@@ -0,0 +1,37 @@
|
||||
=== tests/cases/conformance/jsx/file.tsx ===
|
||||
|
||||
declare module JSX {
|
||||
>JSX : any
|
||||
|
||||
interface Element { }
|
||||
>Element : Element
|
||||
|
||||
interface IntrinsicElements {
|
||||
>IntrinsicElements : IntrinsicElements
|
||||
|
||||
[s: string]: any;
|
||||
>s : string
|
||||
}
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/jsx/test.d.ts ===
|
||||
export var React;
|
||||
>React : any
|
||||
|
||||
=== tests/cases/conformance/jsx/react-consumer.tsx ===
|
||||
import {React} from "./test";
|
||||
>React : any
|
||||
|
||||
// Should emit test_1.React.createElement
|
||||
// and React.__spread
|
||||
var foo;
|
||||
>foo : any
|
||||
|
||||
var spread1 = <div x='' {...foo} y='' />;
|
||||
>spread1 : JSX.Element
|
||||
><div x='' {...foo} y='' /> : JSX.Element
|
||||
>div : any
|
||||
>x : any
|
||||
>foo : any
|
||||
>y : any
|
||||
|
||||
20
tests/cases/conformance/jsx/tsxReactEmit5.tsx
Normal file
20
tests/cases/conformance/jsx/tsxReactEmit5.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
//@jsx: react
|
||||
//@module: commonjs
|
||||
|
||||
//@filename: file.tsx
|
||||
declare module JSX {
|
||||
interface Element { }
|
||||
interface IntrinsicElements {
|
||||
[s: string]: any;
|
||||
}
|
||||
}
|
||||
|
||||
//@filename: test.d.ts
|
||||
export var React;
|
||||
|
||||
//@filename: react-consumer.tsx
|
||||
import {React} from "./test";
|
||||
// Should emit test_1.React.createElement
|
||||
// and React.__spread
|
||||
var foo;
|
||||
var spread1 = <div x='' {...foo} y='' />;
|
||||
Reference in New Issue
Block a user