mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
22 lines
565 B
TypeScript
22 lines
565 B
TypeScript
// @jsx: react-jsx,react-jsxdev
|
|
// @strict: true
|
|
// @module: commonjs
|
|
// @filename: preact.tsx
|
|
/// <reference path="/.lib/react16.d.ts" />
|
|
/* @jsxImportSource preact */
|
|
const props = { answer: 42 }
|
|
const a = <div key="foo" {...props}>text</div>;
|
|
const b = <div {...props} key="bar">text</div>;
|
|
|
|
export {};
|
|
|
|
// @filename: react.tsx
|
|
/// <reference path="/.lib/react16.d.ts" />
|
|
/* @jsxImportSource react */
|
|
import "./preact";
|
|
const props2 = { answer: 42 }
|
|
const a2 = <div key="foo" {...props2}>text</div>;
|
|
const b2 = <div {...props2} key="bar">text</div>;
|
|
|
|
export {};
|