UNPKG

@tdi2/di-core

Version:

TypeScript Dependency Injection 2 - Core DI framework

28 lines (27 loc) 1.07 kB
var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); // tools/functional-di-enhanced-transformer/__tests__/__fixtures__/deep-destructuring.basic.input.tsx import React from "react"; function DeepDestructuring(props) { const { user: { profile: { settings: { theme, notifications } } }, config: { apiUrl, timeout }, services } = props; React.useEffect(() => { services.logger?.log(`Theme: ${theme}, Notifications: ${notifications}`); services.api.configure({ url: apiUrl, timeout }); }, [ theme, notifications, apiUrl, timeout ]); return /* @__PURE__ */ React.createElement("div", { "data-theme": theme }, /* @__PURE__ */ React.createElement("p", null, "API: ", apiUrl, " (timeout: ", timeout, "ms)"), /* @__PURE__ */ React.createElement("p", null, "Notifications: ", notifications ? "on" : "off")); } __name(DeepDestructuring, "DeepDestructuring"); export { DeepDestructuring }; //# sourceMappingURL=deep-destructuring.basic.input.js.map