From 0f83709f66a833ba9c754f8adaf863f012b5be9d Mon Sep 17 00:00:00 2001 From: Alexander Teno <65610090+alexander-joinlane@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:48:49 -0400 Subject: [PATCH] Update post_construct.md Seems to be an inaccuracy in the Post Construct Decorator description (implementation seems correct) --- wiki/post_construct.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/wiki/post_construct.md b/wiki/post_construct.md index 9b695f3b1..c9e05d98c 100644 --- a/wiki/post_construct.md +++ b/wiki/post_construct.md @@ -13,18 +13,18 @@ The method can be synchronous or asynchronous. ```ts -interface Katana { - use: () => void; +interface Weapon { + use: () => void; } @injectable() -class Katana implements Katana { +class Katana implements Weapon { constructor() { console.log("Katana is born"); } public use() { - return "Used Katana!"; + console.log("Used Katana!"); } @postConstruct() @@ -32,7 +32,6 @@ class Katana implements Katana { console.log("Used Katana!") } } - ``` ```ts @@ -40,8 +39,10 @@ container.bind("Katana").to(Katana); ``` ```ts -let catana = container.get(); +let katana = container.get(); +katana.use(); > Katana is born +> Tested Katana! > Used Katana! ```