iti
proposal-decorators

iti | proposal-decorators | |
---|---|---|
6 | 73 | |
152 | 2,865 | |
2.0% | 0.3% | |
3.2 | 3.3 | |
8 months ago | 10 months ago | |
TypeScript | ||
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
iti
-
The Problem with Dependency Injection Frameworks
I didn’t want to adopt a framework for a bigger one, so I’ve built a manual DI helper.
It is for typescript. It is really helpful for me.
https://itijs.org
-
Best practice for using different implementations of data fetching code in React/Next.js app?
If you are interested, I wrote an obscure DI helper library to help mi with ts/react/nest apps. Most examples use classes, but it perfectly works with pure functions. Nothing groundbreaking, just helps me ship apps with lazy async data pipelines faster https://github.com/molszanski/iti
-
What do you use for dependency injection?
I've had success in adding an iti to an existing 50K app
- Has anyone successfully created a Dependency Injection using typescript decorators?
- How do I know when to make a custom hook ?
proposal-decorators
-
Exploring the Capabilities of ECMAScript Decorators in Depth
TC39 Decorators Proposal
-
The Teal Programming Language
Minor nitpick: decorators are still in "stage 3". Not formally part of ECMAScript standard yet.[1]
Anyway, that has not stopped large parts of the JavaScript ecosystem -- notably Angular -- from using an experimental variant of decorators, such as the one provided by TypeScript.
[1] https://github.com/tc39/proposal-decorators
-
Svelte5: A Less Favorable Vue3
Yeah it works fine with the latest sveltekit. You do need to set { esbuild: target: "es2022" } in the vite config to enable JS decorators but that isn't specific to svelte. These aren't TS decorators, they're ecmascript decorators (https://github.com/tc39/proposal-decorators) which are at stage 3 and being adopted by JS runtimes.
Under the hood the class is just creating a hidden property with $state({}) and the accessors are reading/writing to that property. Since $state() creates a deeply reactive object it acts the same as marking individual fields with $state().
-
Modern JavaScript Patterns You’ll Want to Use in 2025.
📌 Where it stands: Now in Stage 3, meaning it’s closer to being finalized. TC39 Proposal
-
A Comprehensive Exploration of JavaScript Decorators
For further exploration: TC39 Proposal on Decorators Reflect Metadata API
-
Composing JavaScript Decorators
The Decorators Proposal on GitHub and my previous article on decorators already do a great job of breaking down the basic use-cases of decorators. My goal isn't to recreate those examples there, but instead to highlight some lesser-known features and interactions. Additionally, I'll highlight how to compose or chain multiple decorators on a single class property.
-
The Magic of JavaScript Decorators: Enhancing Classes and Methods
To learn more about decorators, refer to the TC39 Decorators Proposal and explore frameworks and libraries that implement this feature.
-
Scaffolding API projects easily with oak-routing-ctrl
First we have a set of TypeScript Decorators (conforming to TC39 proposal) that makes it straightforward to declare API endpoints & assign it to a handler function in a few lines of code:
-
The long path of JavaScript - from ES6 until today.
Although decorators are not yet available in JavaScript, they are actively used with the help of such transpilers as TypeScript, Babel and Webpack. Currently, the decorators proposal is in Stage 3, which means it is getting closer to being a part of native JavaScript. Decorators are the functions, that are called on other JavaScript elements, such as classes, class elements, methods, or other functions, by adding an additional functionality on those elements.
-
Making Web Component properties behave closer to the platform
Because many rules are common to many attributes (the coerceType operation is defined by WebIDL, or using similar rules, and the HTML specification defines a handful of microsyntaxes for the parseValue and stringifyValue operations), those could be packaged up in a helper library. And with decorators coming to ECMAScript (and already available in TypeScript), those could be greatly simplified:
What are some alternatives?
fold - IoC container with all required goodies to write flexible node applications
remult - Full-stack CRUD, simplified, with SSOT TypeScript entities
genioc - Bloat-free and magical IoC-container for Typescript based on code-generation
arktype - TypeScript's 1:1 validator, optimized from editor to runtime
ExpressBeans - ExpressBeans is a lightweight IoC Container (Inversion of Control Container) that allow a clean java-like code organization.
openapi-typescript - Generate TypeScript types from OpenAPI 3 specs
