@maskedeng-tom/ssrsx
Version:
server side renderer with tsx
36 lines • 1.55 kB
JavaScript
"use strict";
////////////////////////////////////////////////////////////////////////////////
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Fragment = exports.jsxs = exports.jsx = void 0;
////////////////////////////////////////////////////////////////////////////////
const jsx = (tag, props, _key) => {
const _a = props || {}, { children } = _a, attributes = __rest(_a, ["children"]);
if (typeof tag === 'function') {
return { f: tag, props };
}
return { tag, attributes, children };
};
exports.jsx = jsx;
////////////////////////////////////////////////////////////////////////////////
const jsxs = (tag, props, key) => {
return jsx(tag, props, key);
};
exports.jsxs = jsxs;
////////////////////////////////////////////////////////////////////////////////
const Fragment = (props) => {
const _a = props || {}, { children, key } = _a, _rest = __rest(_a, ["children", "key"]);
return { fragment: true, children, key: key };
};
exports.Fragment = Fragment;
//# sourceMappingURL=jsx-runtime.js.map