revenge-bundle-next/shims/react~jsx-runtime.ts
PalmDevs 5b3a8bc5ab
feat: see commit description
- Shim React and React Native
- Move src/components to lib/components
- Exposed lib/components to `unscoped.components`
- scipts/build: Properly set footer sourceURL
- plugins/developer-settings: Debounce searching in Asset Browser
- plugins/settings: Debounce searching in Plugins
2025-06-08 19:01:33 +07:00

22 lines
656 B
TypeScript

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) =>
_jsx(
isProxified(type as object)
? (unproxify(type as object) as ElementType)
: type,
...args,
)) as typeof _jsx
const jsxs = ((type, ...args) =>
_jsxs(
isProxified(type as object)
? (unproxify(type as object) as ElementType)
: type,
...args,
)) as typeof _jsxs
module.exports = { jsx, jsxs, Fragment }