revenge-bundle-next/shims/react~jsx-runtime.ts

23 lines
656 B
TypeScript
Raw Normal View History

import { ReactJsxRuntime } from '@revenge-mod/react'
import { isProxified, unproxify } from '@revenge-mod/utils/proxy'
import type { ElementType } from 'react'
const { jsx: _jsx, jsxs: _jsxs, Fragment } = ReactJsxRuntime
const jsx = ((type, ...args) =>
2025-06-03 16:24:58 +07:00
_jsx(
isProxified(type as object)
? (unproxify(type as object) as ElementType)
: type,
...args,
)) as typeof _jsx
const jsxs = ((type, ...args) =>
2025-06-03 16:24:58 +07:00
_jsxs(
isProxified(type as object)
? (unproxify(type as object) as ElementType)
: type,
...args,
)) as typeof _jsxs
module.exports = { jsx, jsxs, Fragment }