AadamZ5 / AadamZ5/jection

Consider Angular-style `inject` functions in injection contexts

オープン
#3 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
TypeScript
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

This would likely be a large change.

Angular keeps track of injection contexts by keeping a "stack" of contexts. It is a synchronous system. Running in an injection context involves assigning a global variable as part of a wrapper function.

For example, Something like `runInInjectionContext(yourCallback, injector)` would populate a global variable `CURRENT_CONTEXT` to define the injection context. All code running inside the callback `yourCallback` would have access to that context. Once the `yourCallback` returns, the wrapper function `runInInjectionContext` would destruct the context, essentially assigning the global `CURRENT_CONTEXT` to something like `undefined`.

There could potentially be more involved ways to keep the injection context non-global, such as using some sort of function symbol or modifying function prototypes, but that can get messy. Perhaps traversing up a `caller` chain could also do this as well.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

The issue describes adding Angular-style injection contexts. Start by examining the existing injector and dependency injection mechanisms in the codebase. Look for how contexts are currently managed and where a global or call-stack based context could be integrated. Understanding the synchronous wrapper pattern and the potential impact on the framework's architecture is key.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
backend-api-design
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。