Tag

reflect-metadata

0 views collected around this technical thread.

NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Nov 25, 2020 · Fundamentals

Implementing IoC and DI in TypeScript: A Practical Guide

This guide shows how to build a lightweight Inversion of Control container in TypeScript and use Reflect‑Metadata decorators to register providers and inject dependencies, demonstrating how constructor‑based injection decouples classes, simplifies testing, and mirrors patterns used in frameworks such as NestJS, Midway, and Angular.

Inversion of ControlIoCTypeScript
0 likes · 16 min read
Implementing IoC and DI in TypeScript: A Practical Guide
WeDoctor Frontend Technology
WeDoctor Frontend Technology
Jun 8, 2020 · Backend Development

Simplify Koa and Egg Routing with Decorators: A Step-by-Step Guide

This article explains how to use JavaScript decorators to define routes for Koa and Egg frameworks, covering class and method decorators, Reflect metadata, automatic router generation, controller loading, and practical code examples for streamlined backend development.

EggKoaNode.js
0 likes · 10 min read
Simplify Koa and Egg Routing with Decorators: A Step-by-Step Guide