UNPKG

@tdi2/di-core

Version:

TypeScript Dependency Injection 2 - Core DI framework

103 lines (102 loc) 3.82 kB
var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); // tools/functional-di-enhanced-transformer/__tests__/__fixtures__/inline-destructured.basic.transformed.snap.tsx function InlineValueProps(props) { const api = props.services?.api; if (!api) { throw new Error("Could not find implementation for 'ApiInterface'"); } return /* @__PURE__ */ React.createElement("div", null, api.getData(), "Mixed dependencies component"); } __name(InlineValueProps, "InlineValueProps"); function InlineValueFoo(props) { const api = props.services?.api; if (!api) { throw new Error("Could not find implementation for 'ApiInterface'"); } return /* @__PURE__ */ React.createElement("div", null, api.getData(), "Mixed dependencies component"); } __name(InlineValueFoo, "InlineValueFoo"); function InlineDestructuredNested(props) { const api = props.services?.api; if (!api) { throw new Error("Could not find implementation for 'ApiInterface'"); } return /* @__PURE__ */ React.createElement("div", null, api.getData(), "Mixed dependencies component"); } __name(InlineDestructuredNested, "InlineDestructuredNested"); function InlineDestructured(props) { const api = props.api; if (!api) { throw new Error("Could not find implementation for 'ApiInterface'"); } return /* @__PURE__ */ React.createElement("div", null, api.getData(), "Mixed dependencies component"); } __name(InlineDestructured, "InlineDestructured"); function InlineDestProps(props) { const api = props.services?.api; if (!api) { throw new Error("Could not find implementation for 'ApiInterface'"); } return /* @__PURE__ */ React.createElement("div", null, api.getData(), "Mixed dependencies component"); } __name(InlineDestProps, "InlineDestProps"); function InlineDestructured2ndApi(props) { const api = props.services?.api; if (!api) { throw new Error("Could not find implementation for 'ApiInterface'"); } const state = props.services?.state; if (!state) { throw new Error("Could not find implementation for 'TestStateInterface'"); } return /* @__PURE__ */ React.createElement("div", null, state.value, "Mixed dependencies component"); } __name(InlineDestructured2ndApi, "InlineDestructured2ndApi"); function TodoCard(props) { const api = props.services?.api; const { todo: todo1 } = props; if (!api) { throw new Error("Could not find implementation for 'ApiInterface'"); } return /* @__PURE__ */ React.createElement("div", null, todo1.completed ? "completed" : "not completed"); } __name(TodoCard, "TodoCard"); function TodoCard2(props) { const api = props.services?.api; const { todo: todo1 } = props; if (!api) { throw new Error("Could not find implementation for 'ApiInterface'"); } return /* @__PURE__ */ React.createElement("div", null, todo1.completed ? "completed" : "not completed"); } __name(TodoCard2, "TodoCard2"); function TodoCard3(props) { const api = props.services?.api; if (!api) { throw new Error("Could not find implementation for 'ApiInterface'"); } return /* @__PURE__ */ React.createElement("div", null, todo.completed ? "completed" : "not completed"); } __name(TodoCard3, "TodoCard3"); function TodoCard4(props) { const api = props.services?.api; if (!api) { throw new Error("Could not find implementation for 'ApiInterface'"); } return /* @__PURE__ */ React.createElement("div", null, todo.completed ? "completed" : "not completed"); } __name(TodoCard4, "TodoCard4"); export { InlineDestProps, InlineDestructured, InlineDestructured2ndApi, InlineDestructuredNested, InlineValueFoo, InlineValueProps, TodoCard, TodoCard2, TodoCard3, TodoCard4 }; //# sourceMappingURL=inline-destructured.basic.transformed.snap.js.map