I agree with the Author. Js is highly dynamic and powerful so I think it does not really need any kind of IOC. If I pick up the example I will probably end up with something like this:
function whatDoesMyPetSay < T extends { speak: () => string; }>(pet: T): string {
pet.speak();
}
I agree with the Author. Js is highly dynamic and powerful so I think it does not really need any kind of IOC. If I pick up the example I will probably end up with something like this:
function whatDoesMyPetSay < T extends { speak: () => string; }>(pet: T): string {
pet.speak();
}
🙂
Yes, I agree, You can do it in many ways in JavaScript.