Wyrly DI: Type-safe Dependency Injection for Modern TypeScript
Wyrly DI is a newly released dependency injection toolkit specifically designed for modern TypeScript applications. It aims to provide a type-safe approach to dependency injection without relying on legacy decorators or runtime metadata. The toolkit includes features such as standard decorators, type-safe tokens, and explicit dependency definitions, making it suitable for various application architectures.
- ▪Wyrly DI is designed for modern TypeScript applications and avoids using reflect-metadata and legacy decorators.
- ▪It offers features like type-safe tokens and explicit dependency definitions for better code visibility and analysis.
- ▪The toolkit supports different lifetimes for dependencies, including singleton, scoped, and transient.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3947538) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Valid Lab Posted on May 23 • Originally published at zenn.dev Wyrly DI: Type-safe Dependency Injection for Modern TypeScript #typescript #deno #node #opensource We have released Wyrly DI, a dependency injection toolkit for TypeScript. Wyrly DI is designed for modern TypeScript applications that want dependency injection without relying on reflect-metadata, emitDecoratorMetadata, legacy decorators, or parameter decorators.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).