@tdi2/di-core
Version:
TypeScript Dependency Injection 2 - Core DI framework
26 lines (25 loc) • 1 kB
JavaScript
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
// tools/functional-di-enhanced-transformer/__tests__/__fixtures__/inline-without-destructuring.basic.transformed.snap.tsx
import React from "react";
function InlineWithoutDestructuring(props) {
const api = props.services?.api;
if (!api) {
throw new Error("Could not find implementation for 'ApiInterface'");
}
const user = props.services?.user;
if (!user) {
throw new Error("Could not find implementation for 'UserServiceInterface'");
}
React.useEffect(() => {
props.services.api.getData().then((data) => {
props.services.user?.updateProfile(data);
});
}, []);
return /* @__PURE__ */ React.createElement("div", null, "Title: ", props.title);
}
__name(InlineWithoutDestructuring, "InlineWithoutDestructuring");
export {
InlineWithoutDestructuring
};
//# sourceMappingURL=inline-without-destructuring.basic.transformed.snap.js.map