UNPKG

@multiplatform.one/typegraphql

Version:
22 lines (19 loc) 514 B
import { applyClassDecorators } from "./chunk-6IAAYIGD.js"; import { __name } from "./chunk-SHUYVCID.js"; // src/tsyringe.ts import { Lifecycle, injectable, scoped, singleton } from "tsyringe"; import { inject } from "tsyringe"; function Injectable(lifecycle = Lifecycle.ContainerScoped) { let scope = scoped(lifecycle); if (lifecycle === Lifecycle.Singleton) scope = singleton(); return applyClassDecorators(injectable(), scope); } __name(Injectable, "Injectable"); export { Injectable, inject };