From 1121f69ae36b77fbccf317f1af85b68e46599780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=8D=A3=E6=9D=B0?= Date: Wed, 1 Jun 2022 18:29:03 +0800 Subject: [PATCH] feat: container add sugar api, setClass --- src/container.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/container.ts b/src/container.ts index dcf6226..66ee488 100644 --- a/src/container.ts +++ b/src/container.ts @@ -61,7 +61,9 @@ export default class Container implements ContainerType { await instance[md.initMethod!]?.(); return instance; } - + public setClass(ClassType: Identifier) { + this.set({ id: ClassType }) + } public set(options: Partial) { let type = options.type; if (!type) {