mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
96d7293b2c
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jakebailey <[email protected]>
34 lines
842 B
TypeScript
34 lines
842 B
TypeScript
// @target: esnext
|
|
// @module: preserve
|
|
// @moduleResolution: bundler
|
|
// @jsx: react-jsx
|
|
// @strict: true
|
|
|
|
// Test for unicode escape sequence issue in JSX
|
|
// The warning symbol (⚠, U+26A0) should be correctly encoded as \u26A0, not \uFFFD
|
|
|
|
// @filename: jsxUnicodeEscapeSequence.tsx
|
|
|
|
/// <reference path="/.lib/react16.d.ts" />
|
|
|
|
export const InlineUnicodeChar = () => {
|
|
// This should work correctly - inline character with other content
|
|
return <div><span>Warning: ⚠ Error</span></div>;
|
|
};
|
|
|
|
export const StandaloneUnicodeChar = () => {
|
|
// This should reproduce the issue - unicode character on its own line
|
|
return (<div><span>⚠</span>
|
|
⚠
|
|
</div>);
|
|
};
|
|
|
|
export const MultipleUnicodeChars = () => {
|
|
// Test multiple unicode characters
|
|
return (<div>
|
|
⚠
|
|
⛔
|
|
🚨
|
|
</div>);
|
|
};
|